Namespace in reactor_fight_menu.js

W

14 functions in 4 groups · hide internal

A Battle Room: a classic battle staged in 3D.

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 source
W.isMenuOpen()

Whether the battle menu is up on the scene that is running (the battle waits behind it).

canOpenMenu

static source
W.canOpenMenu()

Whether Cancel with nothing to step back from opens the battle menu now.

Actions

openMenu

static source
W.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 source
W.closeMenu(scene, atOnce)

Shut the battle menu; atOnce takes it off the screen this frame (it closes over a few otherwise).

changeOption

static source
W.changeOption(win, step)

The setting under the cursor to its next (or last) value.

Updating & Drawing

updateMenu

static source
W.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 source
W.controlRows()

The Controls page: what each control does and the keys or buttons that do it now, for the device used last.

menu

static source
W.menu(scene)

Menu.

fitMenu

static source
W.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.

menuPage

static source
W.menuPage(scene, page)

Menu page.

menuBack

static source
W.menuBack(scene)

One step back in the menu: from a page to the menu, from the menu (or a question asked from a unit's menu) out of it.

menuDo

static source
W.menuDo(scene, command)

Shut the menu and do what was chosen.

askEndTurn

static source
W.askEndTurn(scene)

End Turn chosen from a unit's menu: asked first when other units would lose their turn.

askFall

static source
W.askFall(scene)

A way that ends in a fatal fall was chosen (Lethal jumps: Ask first): the question, Stay first.