OptionsComponent
Summary
This component handles the options in the top menu.
Constructor
OptionsComponent
Syntax
OptionsComponent
(
-
core
Summary
Parameters:
-
core
CoreThe main engine.
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
startListening
Syntax
startListening
()
Summary
Calls all the event listeners.stopListening
Syntax
stopListening
()
Summary
Removes all the event listeners.update
Syntax
update
()
Summary
Generic update method, called on every frameProperties
priority
Syntax
priority
Number
Summary
Priority of the component in the "update" and "draw" routinesstructure
Syntax
structure
wnp.Structure
Summary
Structure file instance (shortcut to wanaplan.structure). This is the base object where the whole plan is savedEvents
wnp.request.changeLang
Syntax
wnp.request.changeLang
Summary
Fired to change the language on wanaplan
wnp.ui.showAboutWindow
Syntax
wnp.ui.showAboutWindow
Summary
Fired to show the 'About' window