5
packages/example/gen/godot/src/TestUi1.nodes.gen.ts
Normal file
5
packages/example/gen/godot/src/TestUi1.nodes.gen.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
declare module "godot" {
|
||||||
|
interface SceneNodes {
|
||||||
|
"src/TestUi1.tscn": {};
|
||||||
|
}
|
||||||
|
}
|
||||||
6
packages/example/gen/godot/src/TestUi1.tscn.gen.ts
Normal file
6
packages/example/gen/godot/src/TestUi1.tscn.gen.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import TestUi1 from "../../../src/TestUi1";
|
||||||
|
declare module "godot" {
|
||||||
|
interface ResourceTypes {
|
||||||
|
"res://src/TestUi1.tscn": PackedScene<TestUi1>;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,5 +11,6 @@ config_version=5
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="example"
|
config/name="example"
|
||||||
|
run/main_scene="uid://ckb5ke2llfynx"
|
||||||
config/features=PackedStringArray("4.5", "Forward Plus")
|
config/features=PackedStringArray("4.5", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|||||||
11
packages/example/src/TestUi1.ts
Normal file
11
packages/example/src/TestUi1.ts
Normal 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)
|
||||||
|
}
|
||||||
|
}
|
||||||
1
packages/example/src/TestUi1.ts.uid
Normal file
1
packages/example/src/TestUi1.ts.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://ibm3smonxuoh
|
||||||
12
packages/example/src/TestUi1.tscn
Normal file
12
packages/example/src/TestUi1.tscn
Normal 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")
|
||||||
3
packages/example/src/TestUi1Component.tsx
Normal file
3
packages/example/src/TestUi1Component.tsx
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export function TestUi1Component() {
|
||||||
|
return <node2D />
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user