GUISlider

From Virtual World Web Wiki
Jump to: navigation, search

Component representing a handle we can slide back and forth to adjust a value

Remarks [edit]

Properties

GUISprite BackgroundSprite {get;}
Reference to the sprite used as a backdrop for the slider
GUIImageBox Fill {get;}
Reference to the ImageBox representing the filled area of the slider
GUIRectTransform FillArea {get; set;}
Reference to the RectTransform of the filled area of the slider
GUIRectTransform HandleArea {get; set;}
Reference to the RectTransform of the handle of the slider
bool Horizontal {get; set;}
Should the slider be oriented horizontally?
float Max {get; set;}
Maximum value of the slider
float Min {get; set;}
Minimum value of the slider
bool Reverse {get; set;}
Should the direction the slider fills up be reversed? (i.e.: low values on the right or the top)
GUIRectTransform SlideArea {get; set;}
Reference to the RectTransform of the slideable area of the slider
float Value {get; set;}
Current value of the slider
bool WholeNumbers {get; set;}
Should the slider only use whole numbers?

Events

OnUpdate()
Event called when we change the value of the slider