Closes the two open issues and lands the pending unreleased batch: - #90: `Sprite { atlas: 1 }` routes esys_sprite through atlas_draw_ex (scale/flip/tint), so cell / cell_span / strip ids of any size draw through the engine sprite-render system. examples/library/sprite_atlas is the pixel-readback regression. - #91: `become` from an @On(Event) listener / global handler / plain function no longer segfaults the compiler; it emits @L_scene_leave() (a dispatch on the live scene id) so the leaving scene's on-exit runs. UI_* handles are readable from any code (widget table built on first use). examples/library/scene_menus covers it. - fix: a windowed `ludicc -o` build that reaches the audio runtime only through the atlas/Assets preload import now links audio.ll + AVFoundation (the audio backend link was gated on a game-level Audio.* call, so any windowed game declaring Sprite failed to link). - the hand-written "Unreleased" CHANGELOG section is converted to changesets under changes/ so `x release` generates it. - plus the batch: engine-driven retained UI + UiClicked event, Overlay phase, TileSkin tilemap-render system, Key.* constants, Font/Ui/File namespaces, Sprite.strip, prefabs, managers, countdown fields, enum-typed machines, layer @Queries, ludic.prefs / ludic.dungeon packages, Ai.seek pathing, Solids.solid2, cursor confine (mode 3) fix, shooter centre-aim fix, reserved-word function diagnostic. Verified: x test (124/124), x test-tools, check-impl, check-vocabulary, check-docs, docs-gen + docs-check, bootstrap-cfree (seed is a fixpoint). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
e9c2c51bc3
commit
ad548840c7
139 changed files with 58981 additions and 43671 deletions
|
|
@ -164,6 +164,13 @@ function ui_focusables() -> int {
|
|||
return n
|
||||
}
|
||||
|
||||
# a focused control was activated (Enter / Space / pad A): the event-driven form of
|
||||
# ui_clicked — `@On(UiClicked) handler { if id == UI_Play { ... } }`.
|
||||
event UiClicked { id: int = 0 }
|
||||
|
||||
# Ui.close(): no menu is active (the same as opening root -1)
|
||||
function rt_ui_close() -> void { rt_ui_open(0 - 1) }
|
||||
|
||||
function rt_ui_open(root: int) -> void {
|
||||
ui_active = root
|
||||
let n = ui_focusables()
|
||||
|
|
@ -172,8 +179,8 @@ function rt_ui_open(root: int) -> void {
|
|||
}
|
||||
|
||||
function rt_ui_tick(k: int) -> void {
|
||||
if ui_active < 0 { return }
|
||||
for i in 0 .. ui_n { ui_fired[i] = 0 }
|
||||
for i in 0 .. ui_n { ui_fired[i] = 0 } # a closed UI clears clicks too, so a stale
|
||||
if ui_active < 0 { return } # activation never leaks to the next frame/scene
|
||||
ui_layout()
|
||||
let n = ui_focusables()
|
||||
if n == 0 {
|
||||
|
|
@ -196,9 +203,11 @@ function rt_ui_tick(k: int) -> void {
|
|||
cur = (cur + 1) % n
|
||||
ui_focus = ui_fl[cur]
|
||||
}
|
||||
if k == 32 { ui_fired[ui_focus] = 1 }
|
||||
if k == 10 { ui_fired[ui_focus] = 1 }
|
||||
if k == 13 { ui_fired[ui_focus] = 1 }
|
||||
var fire = 0
|
||||
if k == 32 { fire = 1 }
|
||||
if k == 10 { fire = 1 }
|
||||
if k == 13 { fire = 1 }
|
||||
if fire == 1 { ui_fired[ui_focus] = 1; emit UiClicked(id: ui_focus) }
|
||||
}
|
||||
|
||||
function rt_ui_render() -> void {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue