Example work
Some checks failed
Lint / lint (push) Failing after 9s

This commit is contained in:
Julien Valverdé
2025-12-29 00:04:53 +01:00
parent 945ef34829
commit cfdcae0892
7 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
declare module "godot" {
interface SceneNodes {
"src/TestUi1.tscn": {};
}
}

View File

@@ -0,0 +1,6 @@
import TestUi1 from "../../../src/TestUi1";
declare module "godot" {
interface ResourceTypes {
"res://src/TestUi1.tscn": PackedScene<TestUi1>;
}
}

View File

@@ -11,5 +11,6 @@ config_version=5
[application]
config/name="example"
run/main_scene="uid://ckb5ke2llfynx"
config/features=PackedStringArray("4.5", "Forward Plus")
config/icon="res://icon.svg"

View File

@@ -0,0 +1,11 @@
import { Control } from "godot"
import { Renderer } from "react-godot-renderer"
import { TestUi1Component } from "./TestUi1Component"
export default class TestUi1 extends Control {
// Called when the node enters the scene tree for the first time.
_ready(): void {
Renderer.render(React.createElement(TestUi1Component), this)
}
}

View File

@@ -0,0 +1 @@
uid://ibm3smonxuoh

View File

@@ -0,0 +1,12 @@
[gd_scene load_steps=2 format=3 uid="uid://ckb5ke2llfynx"]
[ext_resource type="Script" uid="uid://ibm3smonxuoh" path="res://src/TestUi1.ts" id="1_nkte1"]
[node name="TestUi1" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_nkte1")

View File

@@ -0,0 +1,3 @@
export function TestUi1Component() {
return <node2D />
}