Difference between revisions of "Board18Market5"

From BOARD18 Project WIKI
Jump to navigation Jump to search
(Initial version of this page)
 
m
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ReleaseNoticeX|2.5|Design_Document_board18Market_Page}}
board18Market5.js contains all the right-click logic for the Market page.<br>
board18Market5.js contains all the right-click logic for the Market page.<br>
A right click event on the stock chart in the Market page can  
A right click event on the stock chart in the Market page can  
Line 4: 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 dependent on the context of the event.  
are both dependent on the context of the event.  
== Calls from the ContextMenu() function==
The ContextMenu(event) function in the script file named
[[Board18Market6|Board18Market6.js]]
uses the makeMenuItems function to include the correct menu
items in the menu to be displayed for a particular event.


==Function getMenuType(event)==
==Function getMenuType(event)==
Line 9: Line 16:
from the list below to specify what type of
from the list below to specify what type of
menu to display. Menu types:
menu to display. Menu types:
*"0" - Suppress the menue display entirely.
*"0" - Suppress the menu display entirely.
*"1" - Current box selected and token selected
*"1" - Current box selected and token selected
*"3" - Current unselected box has only one token  
*"3" - Current unselected box has only one token  
*"4" - Current unselected box has multiple tokens  
*"4" - Current unselected box has multiple tokens


==Function makeMenuItems(e)==
==Function makeMenuItems(e)==
The makeMenuItems function will use the getMenuType
The makeMenuItems function will use the getMenuType
function to determine which menu items it will
function to determine which menu items it will
include in the currently displayed menu.
include in the currently displayed menu.
 
==Function 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.

Latest revision as of 06:52, 24 July 2020

This page has been updated to comply with Release 2.5.x of BOARD18. Go Back

board18Market5.js contains all the right-click logic for the Market page.
A right click event on the stock chart in the Market 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 dependent on the context of the event.

Calls from the ContextMenu() function

The ContextMenu(event) function in the script file named Board18Market6.js uses the makeMenuItems function to include the correct menu items in the menu to be displayed for a particular event.

Function getMenuType(event)

The getMenuType() function returns a character from the list below to specify what type of menu to display. Menu types:

  • "0" - Suppress the menu display entirely.
  • "1" - Current box selected and token selected
  • "3" - Current unselected box has only one token
  • "4" - Current unselected box has multiple tokens

Function makeMenuItems(e)

The makeMenuItems function will use the getMenuType function to determine which menu items it will include in the currently displayed menu.