Manages navigation icons on the top of the screen
- Source:
Methods
(static) add(leftIcon0, leftIcon1, leftIcon2, rightIcon0, rightIcon1, state, help)
Add navigation icons.
* The icons on the left are ordered from left to right.
* The icons on the right are ordered from right to left.
* The icons on the left are ordered from left to right.
* The icons on the right are ordered from right to left.
Parameters:
Name | Type | Description |
---|---|---|
leftIcon0 |
boolean | 1st left icon (back) |
leftIcon1 |
boolean | 2nd left icon (main menu) |
leftIcon2 |
boolean | 3rd left icon (solve game) |
rightIcon0 |
boolean | 1st right icon (audio) |
rightIcon1 |
boolean | 2nd right icon (lang) |
state |
undefined | string | state to be called by the 'back' button (must exist if param 'leftIcon0' is true) |
help |
undefined | function | function in the current game state that display correct answer |
- Source:
(static) callState(state)
When 'back' icon is clicked go to this state
Parameters:
Name | Type | Description |
---|---|---|
state |
string | name of the next state |
- Source:
(static) onInputDown(x, y)
Called by mouse click event
Parameters:
Name | Type | Description |
---|---|---|
x |
number | contains the mouse x coordinate |
y |
number | contains the mouse y coordinate |
- Source:
(static) onInputOver(x, y)
Called by mouse move event
Parameters:
Name | Type | Description |
---|---|---|
x |
number | contains the mouse x coordinate |
y |
number | contains the mouse y coordinate |
- Source: