BaseTopMenuComponent2D
Summary
A base 2D component to manage top and sub menus.
Constructor
BaseTopMenuComponent2D
Syntax
BaseTopMenuComponent2D
(
-
core
-
name
Summary
Parameters:
-
core
CoreThe main engine.
-
name
StringThe component's name.
Item Index
Methods
Methods
destroy
Syntax
destroy
()
Summary
Called when the component is destroyed. The menu item is removed.
disable
Syntax
disable
()
Summary
Disables the componentenable
Syntax
enable
()
Summary
Enables the componentgetTargeted
Syntax
Summary
Finds out if the given position is over an element handled by the componentParameters:
-
vector
VectorA position, usually the cursor's one.
Returns:
Object:
The targeted element, or null if nothing is found.
initialize
Syntax
initialize
()
Summary
Initializes the component by adding a new entry in the top menu.
onContextChanged
Syntax
onContextChanged
(
-
context
Summary
Method called when the context is switched (2D -> 3D or 3D -> 2D)Parameters:
-
context
StringThe new context