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:
Orkun ÇAKILKAYA 2026-09-25 15:31:34 +03:00
parent 3eda72e8c2
commit 5ffe50ed02
463 changed files with 72045 additions and 67421 deletions

View file

@ -2,6 +2,7 @@
# (absolutely, in its parent) and is drawn on the top layer, over everything. While one is up the
# pointer and the keyboard are its: a press outside it, or Esc, closes it (on-close), and Tab
# walks only its own controls.
var pop_list: []UiNode = new []UiNode
function pp_find(n: UiNode, out: []UiNode) -> void {
if n.popover {
push(out, n)
@ -17,16 +18,16 @@ function pp_top(root: UiNode) -> UiNode {
return all[len(all) - 1]
}
# the pointer against the popover: inside it is as usual; a press outside closes it and is spent
function pp_pointer(ui_st: mut UiState, top: UiNode) -> bool {
let i = ui_st.in_now
if not (i.down and not ui_st.in_was_down) { return false }
function pp_pointer(top: UiNode) -> bool {
let i = in_now
if not (i.down and not in_was_down) { return false }
if i.x >= top.x and i.y >= top.y and i.x < top.x + top.cw and i.y < top.y + top.ch { return false }
ui_st.fr_press_key = ""
ui_fire(ui_st, top, "close", Value.null())
fr_press_key = ""
ui_fire(top, "close", Value.null())
return true
}
function pp_draw_top(ui_st: mut UiState) -> void {
let list = ui_st.pop_list
ui_st.pop_list = new []UiNode
for i in 0 .. len(list) { fr_draw(ui_st, list[i]) }
function pp_draw_top() -> void {
let list = pop_list
pop_list = new []UiNode
for i in 0 .. len(list) { fr_draw(list[i]) }
}