@@ -1,17 +1,25 @@
|
||||
import { Control } from "godot"
|
||||
import { Node } from "react-godot-renderer"
|
||||
import { Control, Label } from "godot"
|
||||
import { Component } from "react-godot-renderer"
|
||||
|
||||
|
||||
const ControlFC = Component.make(Control)
|
||||
const LabelFC = Component.make(Label)
|
||||
|
||||
export function TestUi1Component() {
|
||||
return (
|
||||
<Node
|
||||
class={Control}
|
||||
<ControlFC
|
||||
name="Root"
|
||||
anchor_left={0}
|
||||
/>
|
||||
anchor_top={0}
|
||||
anchor_right={0}
|
||||
anchor_bottom={0}
|
||||
>
|
||||
<LabelFC
|
||||
name="Label"
|
||||
text="This is a label"
|
||||
/>
|
||||
|
||||
<node2D name="Issou" />
|
||||
</ControlFC>
|
||||
)
|
||||
}
|
||||
|
||||
Node({
|
||||
class: Control,
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user