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