wip(0.S3): packages and examples migrated again from their pre-0.S sources in one run
ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic 1804 vars into 126 states, 64 into lets; 23498 edits in 460 files Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5ffe50ed02
commit
19fcf60599
459 changed files with 17862 additions and 17603 deletions
|
|
@ -5,12 +5,12 @@ program UiCalc {
|
|||
numbers float
|
||||
const STYLE: string = "<style>.a { width: min(300px, 50vw) }\n.b { width: max(10px, calc(5em + 2px)) }\n.c { width: clamp(50px, 10vw, 100px) }\n.d { height: calc(clamp(1px, 2em, 20px) + 1px) }\n.box { width: 300px; height: 200px; position: relative }\n.p { position: absolute; left: 50%; top: calc(25% + 10px); width: 20px; height: 20px }\n.q { position: absolute; right: calc(10% - 5px); bottom: 50%; width: 20px; height: 20px }\n.r { position: relative; left: 10%; width: 20px; height: 20px }</style>"
|
||||
const BODY: string = "<screen name='c'><div class='a'/><div class='b'/><div class='c'/><div class='d'/><div class='box'><div class='p'/><div class='q'/><div class='r'/></div></screen>"
|
||||
entry {
|
||||
ui_backend(new UiBackend)
|
||||
ui_load_text("<ui>" + STYLE + BODY + "</ui>", "c.xml")
|
||||
ui_show("c", null, 0.0, 0.0, 400.0, 600.0)
|
||||
let r: UiNode = ui_nodes("c", null)
|
||||
ui_place(r, 0.0, 0.0, 400.0, 600.0)
|
||||
entry (ui_st: mut UiState) {
|
||||
ui_backend(ui_st, new UiBackend)
|
||||
ui_load_text(ui_st, "<ui>" + STYLE + BODY + "</ui>", "c.xml")
|
||||
ui_show(ui_st, "c", null, 0.0, 0.0, 400.0, 600.0)
|
||||
let r: UiNode = ui_nodes(ui_st, "c", null)
|
||||
ui_place(ui_st, r, 0.0, 0.0, 400.0, 600.0)
|
||||
let box = r.children[4]
|
||||
let p = box.children[0]
|
||||
let q = box.children[1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue