Difference between revisions of "Board18Map5"
Jump to navigation
Jump to search
m |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ReleaseNoticeX|2. | {{ReleaseNoticeX|2.5|Design_Document_board18Map_Page}} | ||
The board18Map5.js file contains all the right-click logic. | The board18Map5.js file contains all the right-click logic. | ||
A right click event on the game board in the Map page can | A right click event on the game board in the Map page can | ||
Line 7: | Line 7: | ||
== Calls from the ContextMenu() function== | == Calls from the ContextMenu() function== | ||
The ContextMenu(event) function in the script file named | The ContextMenu(event) function in the script file named | ||
[Board18Map6|Board18Map6.js] | [[Board18Map6|Board18Map6.js]] | ||
uses the makeMenuItems function to include the correct menu | uses the makeMenuItems function to include the correct menu | ||
items in the menu to be displayed for a particular event. | items in the menu to be displayed for a particular event. |
Latest revision as of 06:53, 24 July 2020
This page has been updated to comply with Release 2.5.x of BOARD18. | Go Back |
The board18Map5.js file contains all the right-click logic.
A right click event on the game board in the Map page can
cause a popup menu to be displayed.
Whether this menu is
displayed at all and the selection of items in this menu
are both dependant on the context of the event.
Calls from the ContextMenu() function
The ContextMenu(event) function in the script file named Board18Map6.js uses the makeMenuItems function to include the correct menu items in the menu to be displayed for a particular event.
makeMenuItems
The makeMenuItems() function will use the getMenuType function to determine which menu items it will include in the currently displayed menu.
getMenuType
The getMenuType() function returns a character from the table below to specify what type of menu to display.
"0" | Suppress the menue display entirely |
"1" | Current hex selected and token selected |
"2" | Current hex selected and tile selected |
"3" | Current unselected hex has only one token [no tile] |
"4" | Current unselected hex has mutiple tokens [no tile] |
"5" | Current unselected hex has only a tile [no token] |
"6" | Current unselected hex has a tile and one token |
"7" | Current unselected hex has a tile and mutiple tokens |