MenuOverlay
The Menu Overlay is the main overlays it allow you to create HUD, Menus, Inventories, ETC... This is also what you will use to create web app with the EGE
How to Initialize the Menu Overlay?
To initialize the Menu Overlay simply call the function AddNewMenuOverlay from the GUI group.
Class Details
Functions:
Initialization & Main Functions
Name |
Arguments |
Return |
Description |
Init |
|
VOID |
This function Initialized every part of the viewer: HMTL, CSS, Data, Events, etc... It will be generated in the defined ID and all HTML IDs used for this will start by the RegistryName defined in arguments. |
Launch |
|
VOID |
Launch all systems required by the this and will call all children launch. |
Setters Functions
Name |
Arguments |
Return |
Description |
IsFillingViewport |
|
VOID |
Setup an Overlay IsFilling mean it cover the whole viewport, so it will lock all interaction behind it. If you set it has fault all the interaction will go through (no more event on the overlay - in that case use ForceInteraction function to make it interactive). |
SetBackgroundColor |
|
VOID |
Setup the background color. |
SetBackgroundImage |
|
VOID |
Setup the background image. |
Reset |
|
VOID |
Will destroy and remove everything in the overlay. |
Design & Other Functions
Name |
Arguments |
Return |
Description |
AddWidget |
|
Will add a selected children widgets in itself and return it. Note: The children will always they're IDs starting by the parent name, so time it's not in the same family you can add an identical name. |
|
AddPopUp |
|
Add a new PopUp window to the overlay. |
Interaction Functions
Name |
Arguments |
Return |
Description |
Movable |
|
VOID |
This function will authorize the overlays to move freely on a 2D plane when the selected mouse button is hold. This function will create all events and will change cursor type to grab |
AddClick |
|
VOID |
Set the mouse down and up events. |
AddMouseMove |
|
VOID |
Set the mouse move events. |
AddInteractiveToolBox |
Set an InteractiveToolBox working with this overlay (it return it for setters). |
Linker Functions
Name |
Arguments |
Return |
Description |
CreateLink |
Boolean |
It create create a linker at Pos. This linker will now be attached to the mouse. Send back a Boolean if the linker has been created. |
|
CancelLink |
|
VOID |
If the link is still active (still following cursor) then use this function to cancel this. |
ValidateLink |
Boolean |
Will lock the linker on the defined position. Send back a Boolean if the linker has been locked. |
|
GetLinker |
You can retrieved an existing linker by using it's position and offset position. |
||
RemoveLinker |
None |
Will use the position and the offset position to find the linker then it will remove and destroy it. |
|
ClearLinker |
|
None |
Will remove all linker. |
Private Details
All private details are usable but its recommended to not use any of those. It might modify the proper functioning of the class.
Variables (Members):
Main Members
Name |
Type |
Default Value |
Description |
id |
String |
undefined |
Global HMTL Id of the viewer (# + name). |
registryName |
String |
undefined |
Name of this overlay. |
basedId |
String |
undefined |
Where it is located is the existing DOM (its parent). |
Information
Name |
Type |
Default Value |
Description |
lastMousePos |
x: 0 and y: 0 |
Hold where the mouse in the last move. |
|
shiftX |
Integer |
0 |
Hold the x shift the overlays made (When user is moving the overlay). It is used by widgets to recalculate position. |
shiftX |
Integer |
0 |
Hold the y shift the overlays made (When user is moving the overlay). It is used by widgets to recalculate position. |
isMoving |
Boolean |
false |
Used to check if the overlay is moving. |
mouseMoveButton |
Integer |
2 |
Used to defined which mouse button make the overlay moving |
Widgets
Name |
Type |
Default Value |
Description |
AllWidget |
Widgets[] |
[] |
Array holding all the Widgets in the overlay. |
lastZIndex |
Integer |
false |
To make sure the Widgets are properly layered we decrement this variable each widgets. |
Linker
Name |
Type |
Default Value |
Description |
allLinker |
Linker[] |
[] |
Array holding all the Linker in the overlay. |
lastLinkerID |
Integer |
0 |
To make sure the Linker are properly layered we increment this variable each widgets. |
doesLinkerActive |
Boolean |
false |
Used to check if a Linker is moving with the cursor. |
Tool Box
Name |
Type |
Default Value |
Description |
toolBox |
null |
Hold the active toolbox set by AddInteractiveToolBox. |
|
toolBoxIsOpen |
Boolean |
false |
Used to check if toolBox is open. |
Functions:
Interaction Functions
Name |
Arguments |
Return |
Description |
MoveAll |
|
None |
This function is called when the overlay is moving to move all overlays components. |
Linker Functions
Name |
Arguments |
Return |
Description |
MouseMove |
|
None |
This function is called when the mouse is moving and a linker is active to make it follow it. |
Util Functions
Name |
Arguments |
Return |
Description |
GetLinkersID |
|
String |
Return the linker div ID. |
Compatibility
LANGUAGE CLASS: Not compatible.
Created with the Personal Edition of HelpNDoc: Free Kindle producer