|
Public Member Functions |
| int | event (int) |
| bool | onKeyEvent (SDLKey key) |
| | Called on keyboard events.
|
| void | show () |
| void | hide () |
| void | setPage (int p) |
| int | getPage () |
| void | setCondition (int n, bool c) |
| int | isHidden () |
| void | draw () |
| | Draw overlay object.
|
| void | setText (char *t) |
| | Set text for all menu pages.
|
| void | setPageText (const char *t, int page, int line) |
| | Update text for menu page page starting at line line.
|
| void | clearPage (int page, int line, int count) |
| void | setVariable (char *name, const char *value) |
| | Set value of menu variable name.
|
| void | bindVariable (char *name, const char *str) |
| | Bind str to menu variable name.
|
| void | setCursor (int p, int l, int c) |
| void | pushCursorPos (int p, int l, int c) |
| void | popCursorPos () |
| void | mprint (const char *fmt,...) |
| | Update menu text from cursor position.
|
| | Menu () |
Public Attributes |
| AdsoLua | menuCtrl |
The menu system implements the overall userinterface to the application. The menu consists of a number of text pages that may be displayed as Overlay objects. The pages are preloaded at start-up from the file scripts/menu.txt. The pages may be used statically to display information (such as the "Mission objective" page) or they may be updated dynamically to implement dialog-like user inteface (such as the NetLink page). The Menu class does not implement any menu content functionality. All content functionality is implemented in the Lua script scripts/menu.lua. The Lua script defines how the menu system responds to user input (and certain application events). This division makes it possible to change the user interface without recomplilation.