> For the complete documentation index, see [llms.txt](https://ferdowsur.gitbook.io/modular-3d-text/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ferdowsur.gitbook.io/modular-3d-text/ui/slider/script-documentation.md).

# Script documentation

Slider.cs in  TinyGiantStudio.Text namespace

*If anything except method names starts with a capital letter, it's a property.*

## *<mark style="color:yellow;">Utility</mark>*

### *<mark style="color:orange;">Variables</mark>*

<table data-full-width="true"><thead><tr><th width="241">Variable</th><th width="179.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>CurrentValue</strong></td><td>float</td><td><em>The current value.</em></td></tr><tr><td><strong>CurrentPercentage</strong></td><td>float</td><td><em>Returns the current value in percentage.</em></td></tr><tr><td><strong>minValue</strong></td><td>float</td><td><em>The minimum value allowed by the slider.</em></td></tr><tr><td><strong>maxValue</strong></td><td>float</td><td><em>The maximum value allowed by the slider.</em></td></tr><tr><td></td><td></td><td></td></tr><tr><td><strong>autoFocusOnGameStart</strong></td><td>bool</td><td><em>If set to true, the slider is focused on awake. The slider is scrollable with a keyboard when focused.</em><br><em>If it is in a list, the list controls who to focus on.</em></td></tr><tr><td><strong>interactable</strong></td><td>bool</td><td><em>As the name suggests, if it isn't interactable nothing can interact with it and it gets ignored in a list.</em></td></tr><tr><td><strong>directionChoice</strong></td><td>int</td><td><em>0 is left to right</em></td></tr></tbody></table>

### *<mark style="color:orange;">Methods</mark>*

<table data-full-width="true"><thead><tr><th width="308">Method</th><th>Description</th></tr></thead><tbody><tr><td><a href="/modular-3d-text/ui/slider/script-documentation/updatevalue.md"><strong>UpdateValue</strong></a></td><td></td></tr><tr><td><a href="/modular-3d-text/ui/slider/script-documentation/increasevalue.md">IncreaseValue</a></td><td></td></tr><tr><td><a href="/modular-3d-text/ui/slider/script-documentation/decreasevalue.md">DecreaseValue</a></td><td></td></tr><tr><td><strong>Focus</strong> (<em>bool</em> <strong>enable</strong>)</td><td><em>Changes the current focus state to the parameter.</em></td></tr><tr><td><a href="/modular-3d-text/ui/list.md"><em>List</em> </a><strong>GetParentList</strong> ()</td><td><em>Returns the parent</em> <a href="/modular-3d-text/ui/list.md"><em>list</em></a> <em>if one exists.</em></td></tr><tr><td><strong>Interactable</strong> ()</td><td><em>Sets slider to interactable</em></td></tr><tr><td><strong>Uninteractable</strong> ()</td><td><em>Sets slider to uninteractable.</em></td></tr><tr><td><strong>GetCurrentValueFromHandle</strong> ()</td><td><em>Updates the value of the slider according to position of the handle.</em><br><em>Used by raycast selector to update the value after dragging handle.</em></td></tr></tbody></table>

## *<mark style="color:yellow;">Events</mark>*

### *<mark style="color:orange;">Variables</mark>*

<table data-full-width="true"><thead><tr><th width="258">Variable</th><th width="175.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><a href="/modular-3d-text/ui/slider.md#value-range-events"><strong>useValueRangeEvents</strong></a></td><td>bool</td><td></td></tr><tr><td>usePercentage</td><td>bool</td><td>If set to true, uses percentage value to evaluate Value Range Events.</td></tr><tr><td>valueRangeEvents</td><td>List&#x3C;ValueRange></td><td></td></tr></tbody></table>

### *<mark style="color:orange;">Methods</mark>*

<table data-full-width="true"><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><strong>ValueChanged ()</strong></td><td><em>Calls events after value is changed.</em></td></tr><tr><td>NewValueRange ()</td><td>Creates new value range event</td></tr></tbody></table>

## *<mark style="color:yellow;">Visual</mark>*

### *<mark style="color:orange;">Variables</mark>*

<table data-full-width="true"><thead><tr><th width="251.33333333333331">Variable</th><th width="189">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>handle</strong></td><td>SliderHandle</td><td></td></tr><tr><td><strong>progressBar</strong></td><td>Transform</td><td></td></tr><tr><td><strong>progressBarPrefab</strong></td><td>GameObject</td><td></td></tr><tr><td><strong>background</strong></td><td>Transform</td><td></td></tr><tr><td><strong>backgroundSize</strong></td><td>float</td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td><strong>unSelectedHandleMat</strong></td><td></td><td></td></tr><tr><td><strong>selectedHandleMat</strong></td><td></td><td></td></tr><tr><td><strong>clickedHandleMat</strong></td><td></td><td></td></tr><tr><td><strong>disabledHandleMat</strong></td><td></td><td></td></tr></tbody></table>

### *<mark style="color:orange;">Methods</mark>*

<table data-full-width="true"><thead><tr><th width="280.3333333333333">Method</th><th>Description</th></tr></thead><tbody><tr><td><strong>UpdateGraphic</strong> ()</td><td></td></tr><tr><td><strong>SelectedVisual</strong> ()</td><td></td></tr><tr><td><strong>UnSelectedVisual</strong> ()</td><td></td></tr><tr><td><strong>ClickedVisual</strong> ()</td><td></td></tr><tr><td><strong>DisabledVisual</strong> ()</td><td></td></tr><tr><td><strong>UpdateBackgroundSize</strong> ()</td><td></td></tr></tbody></table>

## *<mark style="color:yellow;">Input</mark>*

<table data-full-width="true"><thead><tr><th width="169.33333333333331">Variable</th><th width="115">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>keyStep</strong></td><td>float</td><td><em>Controls how fast the slider moves on input.</em></td></tr></tbody></table>
