diff options
| author | NotRexed <therealnothingfn@gmail.com> | 2026-11-26 23:50:39 -0500 |
|---|---|---|
| committer | NotRexed <therealnothingfn@gmail.com> | 2026-11-27 00:11:49 -0500 |
| commit | 0ed5c935d7ba64ac48788b22f363482a3c2ffa40 (patch) | |
| tree | 5addd2810c3621aa21c339c372e50d1ef9f1d5fc /docs/lua-modding.md | |
| parent | 5b7b7021616689c5df71943e6a39f1bb0fd09936 (diff) | |
leonida-menu: a Lua mods page, a draw-list overlay and keys held for the title
What: three things the Lua modding API will stand on, none of them used yet.
- mods.rs: the "Mods" page of the F4 menu (Reload Lua mods, one page per mod
page) from pages a mods thread publishes; what the player does with an item is
queued for that thread, the menu never runs a mod's code. Only present once
mods::enable() was called.
- overlay.rs: a list of texts and rectangles (1080-line pixels, scaled with the
picture) painted on the CPU into one picture the size of the drawing, set by
one call and seen by a present as one atomic bit (work() & LUA_DRAW). An
unchanged list is not painted again. Frame gains an optional origin.
- knobs: injected keys (a 256-bit mask, an atomic flag) for the input shim, and
the LUA_DRAW work bit. Menu::replace_pages swaps the pages while the menu is
open, popping the cursor off pages that went.
Why: the F4 menu's items name themselves with &'static str and its painter put
everything in the menu's corner; a mod's pages and drawing need both dynamic.
How checked: cargo test -p leonida-menu --lib (47 passed, 14 of them new);
scripts/check_no_game_data.py on the files. AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/lua-modding.md')
0 files changed, 0 insertions, 0 deletions