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
|
|
@ -6,22 +6,21 @@ export property UiBox {
|
|||
w: float = 0.0
|
||||
h: float = 0.0
|
||||
}
|
||||
var fb_roots: []UiNode = new []UiNode
|
||||
# the screen pixels per design pixel: the renderer's scale (render3d's includes ui_render3d_scale)
|
||||
export function ui_scale() -> float { return ui_px(1.0) }
|
||||
function fb_keep(screen: string, root: UiNode) -> void {
|
||||
for i in 0 .. len(fb_roots) {
|
||||
if fb_roots[i].key == screen {
|
||||
fb_roots[i] = root
|
||||
export function ui_scale(ui_st: UiState) -> float { return ui_px(ui_st, 1.0) }
|
||||
function fb_keep(ui_st: mut UiState, screen: string, root: UiNode) -> void {
|
||||
for i in 0 .. len(ui_st.fb_roots) {
|
||||
if ui_st.fb_roots[i].key == screen {
|
||||
ui_st.fb_roots[i] = root
|
||||
return
|
||||
}
|
||||
}
|
||||
push(fb_roots, root)
|
||||
push(ui_st.fb_roots, root)
|
||||
}
|
||||
# the box of the element with that id (or key) on any screen shown, in screen pixels; null if none
|
||||
export function ui_box(id: string) -> UiBox {
|
||||
for i in 0 .. len(fb_roots) {
|
||||
let n = fb_find(fb_roots[i], id)
|
||||
export function ui_box(ui_st: UiState, id: string) -> UiBox {
|
||||
for i in 0 .. len(ui_st.fb_roots) {
|
||||
let n = fb_find(ui_st.fb_roots[i], id)
|
||||
if n != null {
|
||||
let b = new UiBox
|
||||
b.x = n.x
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue