wip(0.S2): migrate - a var nothing writes becomes a let; a state is keyed by its module, directory or program, so every program's plan agrees; paths normalized; program states named SceneDemoState / scene_demo_st; the LSP reads state, mut and entry/handler parameters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3eda72e8c2
commit
5ffe50ed02
463 changed files with 72045 additions and 67421 deletions
|
|
@ -6,14 +6,14 @@ program UiBox {
|
|||
numbers float
|
||||
const PAGE: string = "<ui><style>.side { width: 100px; height: 60px; margin: 10px }</style><screen name='b'><p>title</p><div id='panel' class='side'/></screen></ui>"
|
||||
function scale() -> float { return 1.5 }
|
||||
entry (ui_st: mut UiState) {
|
||||
entry {
|
||||
let b = new UiBackend
|
||||
b.scale = fn scale
|
||||
ui_backend(ui_st, b)
|
||||
ui_load_text(ui_st, PAGE, "b.xml")
|
||||
ui_show(ui_st, "b", null, 20.0, 30.0, 800.0, 600.0)
|
||||
let p = ui_box(ui_st, "panel")
|
||||
let none = ui_box(ui_st, "nothing")
|
||||
print(`scale {ui_scale(ui_st)} | panel {int(p.x)},{int(p.y)} {int(p.w)}x{int(p.h)} | missing {none == null}`)
|
||||
ui_backend(b)
|
||||
ui_load_text(PAGE, "b.xml")
|
||||
ui_show("b", null, 20.0, 30.0, 800.0, 600.0)
|
||||
let p = ui_box("panel")
|
||||
let none = ui_box("nothing")
|
||||
print(`scale {ui_scale()} | panel {int(p.x)},{int(p.y)} {int(p.w)}x{int(p.h)} | missing {none == null}`)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue