A group of options.
Public Member Functions | |
ContextEvent | createEvent () |
Creates a context menu event. Used during the option collect process. More... | |
ContextEvent | createEvent (string name) |
Creates a context menu event. Used during the option collect process. More... | |
void | close () |
Closes any visible version of this list only. Does not close parent menu's. E.g. closes a sub-menu if you're on one. More... | |
void | close (bool all) |
Closes any visible version of this list. More... | |
virtual void | run () |
Runs this option (or option 0 if this is a list). More... | |
void | run (int index) |
Runs the option at the given index. Closes the menu if it's open. More... | |
void | display (InputPointer ip, bool instant) |
Collects options and displays the menu at the pointers position. Run this on the 'root' option list only (don't call it on submenu's). More... | |
Dictionary< string, object > | buildGlobals (ContextEvent ce) |
Creates the set of globals to pass through to a standard window. Note that the only required value is 'options' (which is set to this list). Others are 'x' and 'y' - pixel values which originate from the ContextEvent's clientX/Y. More... | |
ContextEvent | collectOptions (InputPointer ip) |
Collects options at the given pointer location. More... | |
void | relocate () |
If this list is visible on the UI, relocate it. Used if e.g. a gameobject is moving around. More... | |
ContextEvent | collectOptions (GameObject go) |
Collects options from the given gameobject (or any parent in the hierarchy). More... | |
ContextEvent | collectOptions (Element e) |
Collects options from the given HTML element. More... | |
Option | add (string markup, OptionEventMethod method) |
Adds the given option to the list. Typically the markup would be a HTML variable. Note that you can also create your own option class (inherit from Option) and add that instead. More... | |
void | add (Option option) |
Adds the given option to the list. More... | |
Static Public Member Functions | |
static void | ResolveOptionFromClick (Dom.Event e) |
Used when an option is triggered (usually by an onclick attribute). More... | |
static Option | ResolveOption (int index, Windows.Window window) |
Resolves an option from a context menu window's document. More... | |
Public Attributes | |
float | range |
The 3D range an option can work from. More... | |
OptionList | parent |
The list that this option belongs to. More... | |
IEventTarget | trigger |
The source trigger. More... | |
Windows.Window | window |
A visible window containing the list. More... | |
Element | triggerElement |
The element that this is a list for. Related to trigger. More... | |
GameObject | triggerGameObject |
The GO that this is the list for. Related to trigger. More... | |
List< Option > | options =new List<Option>() |
The available options. More... | |
Properties | |
bool | is3D [get] |
True if the trigger is a 3D object. More... | |
bool | isOpen [get] |
True if this list is open on the UI. Also see window. More... | |
Vector2 | rootScreenLocation [get] |
Gets the 2D location the root list will appear at. Doesn't figure out where submenu's should go. More... | |
Option | firstOption [get] |
The first option or null. More... | |
Option | this[int index] [get] |
Gets an option from this list safely - this won't throw any errors. More... | |
int | length [get] |
The length of the list. More... | |
bool | hasOptions [get] |
True if there's more than one option (or sub-option). More... | |
|
inline |
Adds the given option to the list. Typically the markup would be a HTML variable. Note that you can also create your own option class (inherit from Option) and add that instead.
|
inline |
Adds the given option to the list.
|
inline |
Creates the set of globals to pass through to a standard window. Note that the only required value is 'options' (which is set to this list). Others are 'x' and 'y' - pixel values which originate from the ContextEvent's clientX/Y.
|
inline |
Closes any visible version of this list only. Does not close parent menu's. E.g. closes a sub-menu if you're on one.
|
inline |
Closes any visible version of this list.
|
inline |
Collects options at the given pointer location.
|
inline |
Collects options from the given gameobject (or any parent in the hierarchy).
|
inline |
Collects options from the given HTML element.
|
inline |
Creates a context menu event. Used during the option collect process.
|
inline |
Creates a context menu event. Used during the option collect process.
|
inline |
Collects options and displays the menu at the pointers position. Run this on the 'root' option list only (don't call it on submenu's).
|
inline |
If this list is visible on the UI, relocate it. Used if e.g. a gameobject is moving around.
|
inlinestatic |
Resolves an option from a context menu window's document.
|
inlinestatic |
Used when an option is triggered (usually by an onclick attribute).
|
inlinevirtual |
Runs this option (or option 0 if this is a list).
Reimplemented in ContextMenus.Option.
|
inline |
Runs the option at the given index. Closes the menu if it's open.
OptionList ContextMenus.OptionList.parent |
The list that this option belongs to.
float ContextMenus.OptionList.range |
The 3D range an option can work from.
IEventTarget ContextMenus.OptionList.trigger |
The source trigger.
Element ContextMenus.OptionList.triggerElement |
The element that this is a list for. Related to trigger.
GameObject ContextMenus.OptionList.triggerGameObject |
The GO that this is the list for. Related to trigger.
Windows.Window ContextMenus.OptionList.window |
A visible window containing the list.
|
get |
The first option or null.
|
get |
True if there's more than one option (or sub-option).
|
get |
True if the trigger is a 3D object.
|
get |
True if this list is open on the UI. Also see window.
|
get |
The length of the list.
|
get |
Gets the 2D location the root list will appear at. Doesn't figure out where submenu's should go.
|
get |
Gets an option from this list safely - this won't throw any errors.