Quick Reference
Checks (True / False) 2
| isMenuOpen() | Whether the battle menu is up on the scene that is running (the battle waits behind it). |
| canOpenMenu() | Whether Cancel with nothing to step back from opens the battle menu now. |
Actions 3
| openMenu() | Show a page of the battle menu (opening it if it is shut). |
| closeMenu() | Shut the battle menu; atOnce takes it off the screen this frame (it closes over a few otherwise). |
| changeOption() | The setting under the cursor to its next (or last) value. |
Updating & Drawing 1
| updateMenu() | Each frame: the menu shuts itself when the battle no longer waits for the player (it ended, an event took ove… |
Other 8
| controlRows() | The Controls page: what each control does and the keys or buttons that do it now, for the device used last. |
| menu() | Menu. |
| fitMenu() | The window fitted to its page: centered, as tall as its rows as far as the screen allows (then it scrolls). |
| menuPage() | Menu page. |
| menuBack() | One step back in the menu: from a page to the menu, from the menu (or a question asked from a unit's menu) ou… |
| menuDo() | Shut the menu and do what was chosen. |
| askEndTurn() | End Turn chosen from a unit's menu: asked first when other units would lose their turn. |
| askFall() | A way that ends in a fatal fall was chosen (Lethal jumps: Ask first): the question, Stay first. |
Checks (True / False)
isMenuOpen
static sourceW.isMenuOpen()
Whether the battle menu is up on the scene that is running (the battle waits behind it).
canOpenMenu
static sourceW.canOpenMenu()
Whether Cancel with nothing to step back from opens the battle menu now.
Actions
openMenu
static sourceW.openMenu(scene, page)
Show a page of the battle menu (opening it if it is shut).
Details
Show a page of the battle menu (opening it if it is shut). root is the page Cancel shuts it from.
closeMenu
static sourceW.closeMenu(scene, atOnce)
Shut the battle menu; atOnce takes it off the screen this frame (it closes over a few otherwise).
changeOption
static sourceW.changeOption(win, step)
The setting under the cursor to its next (or last) value.
Updating & Drawing
updateMenu
static sourceW.updateMenu(scene)
Each frame: the menu shuts itself when the battle no longer waits for the player (it ended, an event took over), and Cancel opens it.
Other
controlRows
static sourceW.controlRows()
The Controls page: what each control does and the keys or buttons that do it now, for the device used last.
fitMenu
static sourceW.fitMenu(scene, win)
The window fitted to its page: centered, as tall as its rows as far as the screen allows (then it scrolls).
Details
The window fitted to its page: centered, as tall as its rows as far as the screen allows (then it scrolls). It keeps a margin to the screen's edges unless the margin would cost a row: on a 480 pixel screen the menu's ten rows (with Retreat) are all on the screen, none under a scroll arrow.
askEndTurn
static sourceW.askEndTurn(scene)
End Turn chosen from a unit's menu: asked first when other units would lose their turn.
askFall
static sourceW.askFall(scene)
A way that ends in a fatal fall was chosen (Lethal jumps: Ask first): the question, Stay first.