Difference between revisions of "GUISelectableComponent"

From Virtual World Web Wiki
Jump to: navigation, search
(Documentation for the GUISelectableComponent class)
(Documentation for the GUISelectableComponent class)
Line 6: Line 6:
 
===Properties===
 
===Properties===
 
:{{CSharp|JSVector4 Border {get; set;} }}
 
:{{CSharp|JSVector4 Border {get; set;} }}
 +
::
 +
::Sets the border across all defined textures
  
 
:{{CSharp|GUIAudio ClickSound {get;} }}
 
:{{CSharp|GUIAudio ClickSound {get;} }}
 +
::
 +
::Reference to audio clip we play when clicking on this component
  
 
:{{CSharp|Color32 DisabledColor {get; set;} }}
 
:{{CSharp|Color32 DisabledColor {get; set;} }}
 +
::
 +
::What color tint do we apply to the texture when disabled? (note: only in Transition ColorTint)
  
 
:{{CSharp|GUISprite DisabledTexture {get;} }}
 
:{{CSharp|GUISprite DisabledTexture {get;} }}
 +
::
 +
::What texture do we change to when this component is disabled? (note: only in Transition SpriteSwap)
  
 
:{{CSharp|bool Enabled {get; set;} }}
 
:{{CSharp|bool Enabled {get; set;} }}
 +
::
 +
::Can we click/interact with this component?
  
 
:{{CSharp|Single FadeDuration {get; set;} }}
 
:{{CSharp|Single FadeDuration {get; set;} }}
 +
::
 +
::How long should a ColorTint transition take to apply?
  
 
:{{CSharp|bool FillCenter {get; set;} }}
 
:{{CSharp|bool FillCenter {get; set;} }}
 +
::
 +
::If the sprite is set to Sliced, should the center be filled?
  
 
:{{CSharp|Color32 HoverColor {get; set;} }}
 
:{{CSharp|Color32 HoverColor {get; set;} }}
 +
::
 +
::What color tint do we apply to the texture when hovering over it? (note: only in Transition ColorTint)
  
 
:{{CSharp|GUIAudio HoverSound {get;} }}
 
:{{CSharp|GUIAudio HoverSound {get;} }}
 +
::
 +
::Reference to audio clip we play when hovering over this component
  
 
:{{CSharp|GUISprite HoverTexture {get;} }}
 
:{{CSharp|GUISprite HoverTexture {get;} }}
 +
::
 +
::What texture do we change to when we hover over this component? (note: only in Transition SpriteSwap)
  
 
:{{CSharp|Type ImageType {get; set;} }}
 
:{{CSharp|Type ImageType {get; set;} }}
 +
::
 +
::What method should we use to display this image?
  
 
:{{CSharp|GUISelectableComponent NextResponder {get; set;} }}
 
:{{CSharp|GUISelectableComponent NextResponder {get; set;} }}
 +
::
 +
::If we tab away from this component, which component should be the next one to receive focus?
  
 
:{{CSharp|Color32 NormalColor {get; set;} }}
 
:{{CSharp|Color32 NormalColor {get; set;} }}
 +
::
 +
::What color tint do we apply to the underlying image?
  
 
:{{CSharp|GUISprite NormalTexture {get;} }}
 
:{{CSharp|GUISprite NormalTexture {get;} }}
 +
::
 +
::What texture is set for this component normally?
  
 
:{{CSharp|bool PreserveAspect {get; set;} }}
 
:{{CSharp|bool PreserveAspect {get; set;} }}
 +
::
 +
::Should the aspect ratio of the image be preserved when stretched?
  
 
:{{CSharp|Color32 PressedColor {get; set;} }}
 
:{{CSharp|Color32 PressedColor {get; set;} }}
 +
::
 +
::What color tint do we apply to the texture when pressing it? (note: only in Transition ColorTint)
  
 
:{{CSharp|GUISprite PressedTexture {get;} }}
 
:{{CSharp|GUISprite PressedTexture {get;} }}
 +
::
 +
::What texture do we change to when we press this component? (note: only in Transition SpriteSwap)
  
 
:{{CSharp|bool TabStop {get; set;} }}
 
:{{CSharp|bool TabStop {get; set;} }}
 +
::
 +
::Should tabbing through controls stop on this component?
  
 
:{{CSharp|GUILabel Text {get;} }}
 
:{{CSharp|GUILabel Text {get;} }}
 +
::
 +
::Reference to the label on this component
  
:{{CSharp|int Transition {get; set;} }}
+
:{{CSharp|Transition Transition {get; set;} }}
 +
::
 +
::Which transition system do we use to effect hovers/clicks?
  
 
===Events===
 
===Events===
 
:{{CSharp|OnBlur(EventHandler<FlexibleEventArgs>)}}
 
:{{CSharp|OnBlur(EventHandler<FlexibleEventArgs>)}}
 +
::
 +
::Event fired when focus is lost on this component
  
 
:{{CSharp|OnFocus(EventHandler<FlexibleEventArgs>)}}
 
:{{CSharp|OnFocus(EventHandler<FlexibleEventArgs>)}}
 +
::
 +
::Event fired when focus comes to this component (via clicking or tab navigating)
  
 
:{{CSharp|OnMouseEntered(EventHandler<FlexibleEventArgs>)}}
 
:{{CSharp|OnMouseEntered(EventHandler<FlexibleEventArgs>)}}
 +
::
 +
::Event fired when mouse first crosses over
  
 
:{{CSharp|OnMouseExited(EventHandler<FlexibleEventArgs>)}}
 
:{{CSharp|OnMouseExited(EventHandler<FlexibleEventArgs>)}}
Line 56: Line 102:
 
===Methods===
 
===Methods===
 
:{{CSharp|void SetFocus()}}
 
:{{CSharp|void SetFocus()}}
 +
::
 +
::Brings focus to this component
  
 
__NOTOC____NOEDITSECTION__
 
__NOTOC____NOEDITSECTION__

Revision as of 16:57, 2 February 2017

Remarks [edit]

Properties

JSVector4 Border {get; set;}
Sets the border across all defined textures
GUIAudio ClickSound {get;}
Reference to audio clip we play when clicking on this component
Color32 DisabledColor {get; set;}
What color tint do we apply to the texture when disabled? (note: only in Transition ColorTint)
GUISprite DisabledTexture {get;}
What texture do we change to when this component is disabled? (note: only in Transition SpriteSwap)
bool Enabled {get; set;}
Can we click/interact with this component?
Single FadeDuration {get; set;}
How long should a ColorTint transition take to apply?
bool FillCenter {get; set;}
If the sprite is set to Sliced, should the center be filled?
Color32 HoverColor {get; set;}
What color tint do we apply to the texture when hovering over it? (note: only in Transition ColorTint)
GUIAudio HoverSound {get;}
Reference to audio clip we play when hovering over this component
GUISprite HoverTexture {get;}
What texture do we change to when we hover over this component? (note: only in Transition SpriteSwap)
Type ImageType {get; set;}
What method should we use to display this image?
GUISelectableComponent NextResponder {get; set;}
If we tab away from this component, which component should be the next one to receive focus?
Color32 NormalColor {get; set;}
What color tint do we apply to the underlying image?
GUISprite NormalTexture {get;}
What texture is set for this component normally?
bool PreserveAspect {get; set;}
Should the aspect ratio of the image be preserved when stretched?
Color32 PressedColor {get; set;}
What color tint do we apply to the texture when pressing it? (note: only in Transition ColorTint)
GUISprite PressedTexture {get;}
What texture do we change to when we press this component? (note: only in Transition SpriteSwap)
bool TabStop {get; set;}
Should tabbing through controls stop on this component?
GUILabel Text {get;}
Reference to the label on this component
Transition Transition {get; set;}
Which transition system do we use to effect hovers/clicks?

Events

OnBlur(EventHandler<FlexibleEventArgs>)
Event fired when focus is lost on this component
OnFocus(EventHandler<FlexibleEventArgs>)
Event fired when focus comes to this component (via clicking or tab navigating)
OnMouseEntered(EventHandler<FlexibleEventArgs>)
Event fired when mouse first crosses over
OnMouseExited(EventHandler<FlexibleEventArgs>)

Methods

void SetFocus()
Brings focus to this component