Modular 3D Text
  • ✉️Contact Support
  • ⭐Read me first
  • Introduction
    • ⚡Namespace
    • ⚡Assembly Definition
    • ⚡Scripting define symbol
    • 3D UI for XR
      • Internal documentation
  • Text
    • Modular 3D Text
      • Script documentation
        • UpdateText
        • MeshPostProcess
        • Internal Documentation
    • Text Updater
    • Fonts
      • Creating fonts
        • Troubleshoot
      • Letter
  • Input
    • Button/Key
      • Button Input System
      • Button Input Processor
    • Mouse/Touch
      • Raycast Selector
      • Raycast Input Processor
    • Troubleshoot
  • Modules
    • Modules
  • UI
    • List
      • Script documentation
    • Button
      • Script documentation
    • Toggle
      • Script documentation
    • Slider
      • Script documentation
        • UpdateValue
        • IncreaseValue
        • DecreaseValue
      • SliderHandle
    • Input Field
      • Script documentation
        • UpdateText
        • ContentType
    • Horizontal Selector
      • Script documentation
  • Layout System
  • Modules
  • Package Importer
  • Utility
    • UI States
    • Asset Settings
  • Version History
Powered by GitBook
On this page
  • Utility
  • Variables
  • Methods
  • Events
  • Variables
  • Methods
  • Visual
  • Variables
  • Methods
  • Input

Was this helpful?

  1. UI
  2. Slider

Script documentation

Slider.cs in TinyGiantStudio.Text namespace

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

Utility

Variables

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

Methods

Method
Description

Focus (bool enable)

Changes the current focus state to the parameter.

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.

Events

Variables

Variable
Type
Description

bool

usePercentage

bool

If set to true, uses percentage value to evaluate Value Range Events.

valueRangeEvents

List<ValueRange>

Methods

Method
Description

ValueChanged ()

Calls events after value is changed.

NewValueRange ()

Creates new value range event

Visual

Variables

Variable
Type
Description

handle

SliderHandle

progressBar

Transform

progressBarPrefab

GameObject

background

Transform

backgroundSize

float

unSelectedHandleMat

selectedHandleMat

clickedHandleMat

disabledHandleMat

Methods

Method
Description

UpdateGraphic ()

SelectedVisual ()

UnSelectedVisual ()

ClickedVisual ()

DisabledVisual ()

UpdateBackgroundSize ()

Input

Variable
Type
Description

keyStep

float

Controls how fast the slider moves on input.

PreviousSliderNextUpdateValue

Last updated 1 year ago

Was this helpful?

GetParentList ()

Returns the parent if one exists.

UpdateValue
IncreaseValue
DecreaseValue
List
list
useValueRangeEvents