Difference between revisions of "Board18Map5"

From BOARD18 Project WIKI
Jump to navigation Jump to search
(2.1)
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ReleaseNoticeX|2.1|Design_Document_board18Map_Page}}
{{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 5: Line 5:
displayed at all and the selection of items in this menu  
displayed at all and the selection of items in this menu  
are both dependant on the context of the event.  
are both dependant on the context of the event.  
==makeMenus==
== Calls from the ContextMenu() function==
The makeMenus() function registers a dynamic context menu which
The ContextMenu(event) function in the script file named
will be rebuilt every time the menu is to be shown. <br>It will
[[Board18Map6|Board18Map6.js]]
use 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.
==makeMenuItems==
==makeMenuItems==
The makeMenuItems() function will use the getMenuType
The makeMenuItems() function will use the getMenuType

Latest revision as of 07: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