@@ -1,12 +1,14 @@
|
|||||||
import Godot from "godot"
|
import Godot from "godot"
|
||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
import { Component } from "react-godot-renderer"
|
import { Component } from "react-godot-renderer"
|
||||||
|
import TestUi1 from "./TestUi1"
|
||||||
|
|
||||||
|
|
||||||
const HFlowContainer = Component.make(Godot.HFlowContainer)
|
const HFlowContainer = Component.make(Godot.HFlowContainer)
|
||||||
const VFlowContainer = Component.make(Godot.VFlowContainer)
|
const VFlowContainer = Component.make(Godot.VFlowContainer)
|
||||||
const Label = Component.make(Godot.Label)
|
const Label = Component.make(Godot.Label)
|
||||||
const CheckBox = Component.make(Godot.CheckBox)
|
const CheckBox = Component.make(Godot.CheckBox)
|
||||||
|
const TestUi1FC = Component.make(TestUi1)
|
||||||
|
|
||||||
export function TestUi2Component() {
|
export function TestUi2Component() {
|
||||||
const [show, setShow] = useState(false)
|
const [show, setShow] = useState(false)
|
||||||
@@ -16,18 +18,16 @@ export function TestUi2Component() {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<VFlowContainer>
|
|
||||||
<HFlowContainer>
|
<HFlowContainer>
|
||||||
|
<VFlowContainer>
|
||||||
<Label text="Show" />
|
<Label text="Show" />
|
||||||
<CheckBox
|
<CheckBox
|
||||||
ref={checkBoxRef}
|
ref={checkBoxRef}
|
||||||
button_pressed={show}
|
button_pressed={show}
|
||||||
/>
|
/>
|
||||||
</HFlowContainer>
|
|
||||||
|
|
||||||
{show &&
|
|
||||||
<Label text="Shown" />
|
|
||||||
}
|
|
||||||
</VFlowContainer>
|
</VFlowContainer>
|
||||||
|
|
||||||
|
{show && <TestUi1FC />}
|
||||||
|
</HFlowContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user