Files
alchemist-accessibility/accessibility/states/actions_menu.lua
T

23 lines
526 B
Lua
Raw Normal View History

2026-08-01 22:00:52 +02:00
-- states/actions_menu.lua — the player's available actions.
--
-- open() preselects whichever entry matches player.currentSelectedAction, so the
-- announcement on entry tells you what is already armed.
return {
probe = {
fn = "keypressed",
focus = "selectedOption",
list = "optionsList",
},
render = function(entry, index, total)
local text = entry.title or entry.name or "?"
if entry.enabled == false then
text = text .. ", unavailable"
end
return text .. ", " .. index .. " of " .. total
end,
}