wip(0.S3): packages and examples migrated in one run - ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d490d4f9f1
commit
3eda72e8c2
172 changed files with 3094 additions and 2966 deletions
|
|
@ -11,18 +11,18 @@ program UiComponent {
|
|||
if n.text != "" { push(out, n.text) }
|
||||
for i in 0 .. len(n.children) { texts(n.children[i], out) }
|
||||
}
|
||||
function frame() -> UiNode {
|
||||
let root: UiNode = ui_nodes("App", null)
|
||||
ui_place(root, 0.0, 0.0, 400.0, 400.0)
|
||||
function frame(ui_st: mut UiState) -> UiNode {
|
||||
let root: UiNode = ui_nodes(ui_st, "App", null)
|
||||
ui_place(ui_st, root, 0.0, 0.0, 400.0, 400.0)
|
||||
return root
|
||||
}
|
||||
entry {
|
||||
var root = frame()
|
||||
entry (ui_st: mut UiState) {
|
||||
var root = frame(ui_st)
|
||||
let b = root.children[0].children[2]
|
||||
ui_press(b.children[1])
|
||||
ui_press(b.children[1])
|
||||
ui_press(root.children[0].children[1].children[1])
|
||||
root = frame()
|
||||
ui_press(ui_st, b.children[1])
|
||||
ui_press(ui_st, b.children[1])
|
||||
ui_press(ui_st, root.children[0].children[1].children[1])
|
||||
root = frame(ui_st)
|
||||
let out = new []string
|
||||
texts(root, out)
|
||||
var joined = ""
|
||||
|
|
@ -30,8 +30,8 @@ program UiComponent {
|
|||
print(joined)
|
||||
let b2 = root.children[0].children[2]
|
||||
print(`b margin {int(b2.mt)}; b text {b2.children[0].fg}; outside {root.children[0].children[3].fg}; button {int(b2.children[1].ch)}`)
|
||||
ui_press(b2.children[2])
|
||||
root = frame()
|
||||
ui_press(ui_st, b2.children[2])
|
||||
root = frame(ui_st)
|
||||
print(root.children[0].children[2].children[0].text)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue