Board18Map5

From BOARD18 Project WIKI
Revision as of 15:44, 4 December 2015 by Rich (talk | contribs) (added release note)
Jump to navigation Jump to search
This page has been updated to comply with Release 1.3.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 context 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.

makeMenus

The makeMenus() function registers a dynamic context menu which will be rebuilt every time the menu is to be shown.
It will use 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