Difference between revisions of "GUIDropdownComponent"
From Virtual World Web Wiki
(Documentation for the GUIDropdownComponent class) |
(Documentation for the GUIDropdownComponent class) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | Abstract class representing components which open to have a panel of subobjects when clicked | ||
+ | |||
*'''Inherits class: [[GUISelectableComponent]]''' | *'''Inherits class: [[GUISelectableComponent]]''' | ||
* This is a JavaScript visible object | * This is a JavaScript visible object | ||
===Remarks <nowiki>[</nowiki>[{{fullurl:GUIDropdownComponent Remarks|action=edit}} edit]<nowiki>]</nowiki>=== | ===Remarks <nowiki>[</nowiki>[{{fullurl:GUIDropdownComponent Remarks|action=edit}} edit]<nowiki>]</nowiki>=== | ||
− | {{:GUIDropdownComponent Remarks}} | + | {{#ifexist:GUIDropdownComponent Remarks|{{:GUIDropdownComponent Remarks}}|}} |
===Properties=== | ===Properties=== | ||
:{{CSharp|float AnimationDelaySeconds {get; set;} }} | :{{CSharp|float AnimationDelaySeconds {get; set;} }} | ||
+ | :: | ||
+ | ::How long to wait for the reveal/disappear animation to complete | ||
:{{CSharp|string DisappearAnimation {get; set;} }} | :{{CSharp|string DisappearAnimation {get; set;} }} | ||
+ | :: | ||
+ | ::Disappear animation to use from the animator when hiding (note: only Disappear01 right now) | ||
:{{CSharp|string MenuItemTemplate {get; set;} }} | :{{CSharp|string MenuItemTemplate {get; set;} }} | ||
+ | :: | ||
+ | ::Template to use for creating subcomponents by default | ||
:{{CSharp|bool MenuVisible {get; set;} }} | :{{CSharp|bool MenuVisible {get; set;} }} | ||
+ | :: | ||
+ | ::Hide/Show the panel of sub components | ||
:{{CSharp|GUIPanel Panel {get;} }} | :{{CSharp|GUIPanel Panel {get;} }} | ||
+ | :: | ||
+ | ::Reference to the panel which holds the subcomponents | ||
:{{CSharp|GUISprite PanelSprite {get;} }} | :{{CSharp|GUISprite PanelSprite {get;} }} | ||
+ | :: | ||
+ | ::Reference to the sprite on the back of the Panel | ||
:{{CSharp|JSVector2 PopupOffset {get; set;} }} | :{{CSharp|JSVector2 PopupOffset {get; set;} }} | ||
+ | :: | ||
+ | ::Offset to place the panel from the parent button | ||
:{{CSharp|string RevealAnimation {get; set;} }} | :{{CSharp|string RevealAnimation {get; set;} }} | ||
+ | :: | ||
+ | ::Reveal animation to use from the animator when showing (note: only Appear01 right now) | ||
===Events=== | ===Events=== | ||
:{{CSharp|OnClosing()}} | :{{CSharp|OnClosing()}} | ||
+ | :: | ||
+ | ::Event fired when we stop showing subcomponents | ||
:{{CSharp|OnDone()}} | :{{CSharp|OnDone()}} | ||
+ | :: | ||
+ | ::Event fired when we choose a subcomponent | ||
:{{CSharp|OnOpening()}} | :{{CSharp|OnOpening()}} | ||
+ | :: | ||
+ | ::Event fired when we start showing subcomponents | ||
===Methods=== | ===Methods=== | ||
:{{CSharp|void ClearItems()}} | :{{CSharp|void ClearItems()}} | ||
+ | :: | ||
+ | ::Remove all items from this component | ||
:{{CSharp|IEnumerable<GUIComponent> GetDropDownItems()}} | :{{CSharp|IEnumerable<GUIComponent> GetDropDownItems()}} | ||
+ | :: | ||
+ | ::Returns a list of the components on the panel | ||
+ | |||
+ | :{{CSharp|GUIComponent GetItem(int i)}} | ||
+ | :: | ||
+ | ::Returns the i'th item from the DropDownComponents collection. | ||
− | :{{CSharp|GUIComponent | + | :{{CSharp|List<GUIComponent> GetItems()}} |
+ | :: | ||
+ | ::Returns a list of all the immediate children of this dropdown component | ||
__NOTOC____NOEDITSECTION__ | __NOTOC____NOEDITSECTION__ |
Latest revision as of 20:50, 12 July 2018
Abstract class representing components which open to have a panel of subobjects when clicked
- Inherits class: GUISelectableComponent
- This is a JavaScript visible object
Remarks [edit]
Properties
- float AnimationDelaySeconds {get; set;}
- How long to wait for the reveal/disappear animation to complete
- string DisappearAnimation {get; set;}
- Disappear animation to use from the animator when hiding (note: only Disappear01 right now)
- string MenuItemTemplate {get; set;}
- Template to use for creating subcomponents by default
- bool MenuVisible {get; set;}
- Hide/Show the panel of sub components
- GUIPanel Panel {get;}
- Reference to the panel which holds the subcomponents
- GUISprite PanelSprite {get;}
- Reference to the sprite on the back of the Panel
- JSVector2 PopupOffset {get; set;}
- Offset to place the panel from the parent button
- string RevealAnimation {get; set;}
- Reveal animation to use from the animator when showing (note: only Appear01 right now)
Events
- OnClosing()
- Event fired when we stop showing subcomponents
- OnDone()
- Event fired when we choose a subcomponent
- OnOpening()
- Event fired when we start showing subcomponents
Methods
- void ClearItems()
- Remove all items from this component
- IEnumerable<GUIComponent> GetDropDownItems()
- Returns a list of the components on the panel
- GUIComponent GetItem(int i)
- Returns the i'th item from the DropDownComponents collection.
- List<GUIComponent> GetItems()
- Returns a list of all the immediate children of this dropdown component