Script documentation
Slider.cs in TinyGiantStudio.Text namespace
Last updated
Slider.cs in TinyGiantStudio.Text namespace
Last updated
Variable | Type | Description |
---|---|---|
Method | Description |
---|---|
Variable | Type | Description |
---|---|---|
Method | Description |
---|---|
Variable | Type | Description |
---|---|---|
CurrentValue
float
The current value.
CurrentPercentage
float
Returns the current value in percentage.
minValue
float
The minimum value allowed by the slider.
maxValue
float
The maximum value allowed by the slider.
autoFocusOnGameStart
bool
If set to true, the slider is focused on awake. The slider is scrollable with a keyboard when focused. If it is in a list, the list controls who to focus on.
interactable
bool
As the name suggests, if it isn't interactable nothing can interact with it and it gets ignored in a list.
directionChoice
int
0 is left to right
Focus (bool enable)
Changes the current focus state to the parameter.
List GetParentList ()
Returns the parent list if one exists.
Interactable ()
Sets slider to interactable
Uninteractable ()
Sets slider to uninteractable.
GetCurrentValueFromHandle ()
Updates the value of the slider according to position of the handle. Used by raycast selector to update the value after dragging handle.
bool
usePercentage
bool
If set to true, uses percentage value to evaluate Value Range Events.
valueRangeEvents
List<ValueRange>
ValueChanged ()
Calls events after value is changed.
NewValueRange ()
Creates new value range event
handle
SliderHandle
progressBar
Transform
progressBarPrefab
GameObject
background
Transform
backgroundSize
float
unSelectedHandleMat
selectedHandleMat
clickedHandleMat
disabledHandleMat
UpdateGraphic ()
SelectedVisual ()
UnSelectedVisual ()
ClickedVisual ()
DisabledVisual ()
UpdateBackgroundSize ()
keyStep
float
Controls how fast the slider moves on input.