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 1: Line 1:
An abstract class for Unity components deriving from Selectable
 
 
 
*'''Inherits class: [[GUILayoutComponent]]'''
 
*'''Inherits class: [[GUILayoutComponent]]'''
 
* This is a JavaScript visible object
 
* This is a JavaScript visible object
Line 8: 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|float FadeDuration {get; set;} }}
 
:{{CSharp|float 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|Transition Transition {get; set;} }}
 
:{{CSharp|Transition Transition {get; set;} }}
::
 
::Which transition system do we use to effect hovers/clicks?
 
  
 
===Events===
 
===Events===
 
:{{CSharp|OnBlur()}}
 
:{{CSharp|OnBlur()}}
::
 
::Event fired when focus is lost on this component
 
  
 
:{{CSharp|OnFocus()}}
 
:{{CSharp|OnFocus()}}
::
 
::Event fired when focus comes to this component (via clicking or tab navigating)
 
  
 
:{{CSharp|OnMouseEntered()}}
 
:{{CSharp|OnMouseEntered()}}
::
 
::Event fired when mouse first crosses over
 
  
 
:{{CSharp|OnMouseExited()}}
 
:{{CSharp|OnMouseExited()}}
::
 
::Event fired when mouse stops being over this component
 
  
 
:{{CSharp|OnOpenContext()}}
 
:{{CSharp|OnOpenContext()}}
::
 
::Event fired when we open a context menu from this component
 
  
 
===Methods===
 
===Methods===
 
:{{CSharp|void SetFocus()}}
 
:{{CSharp|void SetFocus()}}
::
 
::Brings focus to this component
 
  
 
__NOTOC____NOEDITSECTION__
 
__NOTOC____NOEDITSECTION__

Revision as of 12:49, 26 May 2017

Remarks [edit]

Properties

JSVector4 Border {get; set;}
GUIAudio ClickSound {get;}
Color32 DisabledColor {get; set;}
GUISprite DisabledTexture {get;}
bool Enabled {get; set;}
float FadeDuration {get; set;}
bool FillCenter {get; set;}
Color32 HoverColor {get; set;}
GUIAudio HoverSound {get;}
GUISprite HoverTexture {get;}
Type ImageType {get; set;}
GUISelectableComponent NextResponder {get; set;}
Color32 NormalColor {get; set;}
GUISprite NormalTexture {get;}
bool PreserveAspect {get; set;}
Color32 PressedColor {get; set;}
GUISprite PressedTexture {get;}
bool TabStop {get; set;}
GUILabel Text {get;}
Transition Transition {get; set;}

Events

OnBlur()
OnFocus()
OnMouseEntered()
OnMouseExited()
OnOpenContext()

Methods

void SetFocus()