Class EUIPSlider
Slider component. Extends functionality of the UnityEngine.UI.Slider by grouping the control of an TMPro.TMP_InputField or displaying the value in a TMPro.TextMeshProUGUI text field.
If constructing via script, by the time Start() is called you should hook up InputField reference if you plan on using the WithInputField option.
If constructing via script, by the time Start() is called you should hook up LabelText reference if you plan on using the WithLabel option.
Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
UnityEngine.EventSystems.UIBehaviour
UnityEngine.UI.Selectable
UnityEngine.UI.Slider
EUIPSlider
Implements
UnityEngine.EventSystems.IMoveHandler
UnityEngine.EventSystems.IPointerDownHandler
UnityEngine.EventSystems.IPointerUpHandler
UnityEngine.EventSystems.IPointerEnterHandler
UnityEngine.EventSystems.IPointerExitHandler
UnityEngine.EventSystems.ISelectHandler
UnityEngine.EventSystems.IDeselectHandler
UnityEngine.EventSystems.IDragHandler
UnityEngine.EventSystems.IInitializePotentialDragHandler
UnityEngine.EventSystems.IEventSystemHandler
UnityEngine.UI.ICanvasElement
Inherited Members
UnityEngine.UI.Slider.m_Value
UnityEngine.UI.Slider.SetValueWithoutNotify(System.Single)
UnityEngine.UI.Slider.OnValidate()
UnityEngine.UI.Slider.Rebuild(UnityEngine.UI.CanvasUpdate)
UnityEngine.UI.Slider.LayoutComplete()
UnityEngine.UI.Slider.GraphicUpdateComplete()
UnityEngine.UI.Slider.OnEnable()
UnityEngine.UI.Slider.OnDisable()
UnityEngine.UI.Slider.Update()
UnityEngine.UI.Slider.OnDidApplyAnimationProperties()
UnityEngine.UI.Slider.Set(System.Single, System.Boolean)
UnityEngine.UI.Slider.OnRectTransformDimensionsChange()
UnityEngine.UI.Slider.OnPointerDown(UnityEngine.EventSystems.PointerEventData)
UnityEngine.UI.Slider.OnDrag(UnityEngine.EventSystems.PointerEventData)
UnityEngine.UI.Slider.OnMove(UnityEngine.EventSystems.AxisEventData)
UnityEngine.UI.Slider.FindSelectableOnLeft()
UnityEngine.UI.Slider.FindSelectableOnRight()
UnityEngine.UI.Slider.FindSelectableOnUp()
UnityEngine.UI.Slider.FindSelectableOnDown()
UnityEngine.UI.Slider.OnInitializePotentialDrag(UnityEngine.EventSystems.PointerEventData)
UnityEngine.UI.Slider.SetDirection(UnityEngine.UI.Slider.Direction, System.Boolean)
UnityEngine.UI.Slider.UnityEngine.UI.ICanvasElement.get_transform()
UnityEngine.UI.Slider.fillRect
UnityEngine.UI.Slider.handleRect
UnityEngine.UI.Slider.direction
UnityEngine.UI.Slider.minValue
UnityEngine.UI.Slider.maxValue
UnityEngine.UI.Slider.wholeNumbers
UnityEngine.UI.Slider.value
UnityEngine.UI.Slider.normalizedValue
UnityEngine.UI.Slider.onValueChanged
UnityEngine.UI.Selectable.s_Selectables
UnityEngine.UI.Selectable.s_SelectableCount
UnityEngine.UI.Selectable.m_CurrentIndex
UnityEngine.UI.Selectable.AllSelectablesNoAlloc(UnityEngine.UI.Selectable[])
UnityEngine.UI.Selectable.Awake()
UnityEngine.UI.Selectable.OnCanvasGroupChanged()
UnityEngine.UI.Selectable.IsInteractable()
UnityEngine.UI.Selectable.OnTransformParentChanged()
UnityEngine.UI.Selectable.Reset()
UnityEngine.UI.Selectable.InstantClearState()
UnityEngine.UI.Selectable.FindSelectable(UnityEngine.Vector3)
UnityEngine.UI.Selectable.IsHighlighted()
UnityEngine.UI.Selectable.IsPressed()
UnityEngine.UI.Selectable.OnPointerUp(UnityEngine.EventSystems.PointerEventData)
UnityEngine.UI.Selectable.OnPointerEnter(UnityEngine.EventSystems.PointerEventData)
UnityEngine.UI.Selectable.OnPointerExit(UnityEngine.EventSystems.PointerEventData)
UnityEngine.UI.Selectable.OnSelect(UnityEngine.EventSystems.BaseEventData)
UnityEngine.UI.Selectable.OnDeselect(UnityEngine.EventSystems.BaseEventData)
UnityEngine.UI.Selectable.Select()
UnityEngine.UI.Selectable.allSelectablesArray
UnityEngine.UI.Selectable.allSelectableCount
UnityEngine.UI.Selectable.allSelectables
UnityEngine.UI.Selectable.navigation
UnityEngine.UI.Selectable.transition
UnityEngine.UI.Selectable.colors
UnityEngine.UI.Selectable.spriteState
UnityEngine.UI.Selectable.animationTriggers
UnityEngine.UI.Selectable.targetGraphic
UnityEngine.UI.Selectable.interactable
UnityEngine.UI.Selectable.image
UnityEngine.UI.Selectable.animator
UnityEngine.UI.Selectable.currentSelectionState
UnityEngine.EventSystems.UIBehaviour.OnDestroy()
UnityEngine.EventSystems.UIBehaviour.IsActive()
UnityEngine.EventSystems.UIBehaviour.OnBeforeTransformParentChanged()
UnityEngine.EventSystems.UIBehaviour.OnCanvasHierarchyChanged()
UnityEngine.EventSystems.UIBehaviour.IsDestroyed()
Assembly: LlamaSoftware.UI.dll
Syntax
public class EUIPSlider : Slider, IMoveHandler, IPointerDownHandler, IPointerUpHandler, IPointerEnterHandler, IPointerExitHandler, ISelectHandler, IDeselectHandler, IDragHandler, IInitializePotentialDragHandler, IEventSystemHandler, ICanvasElement
Fields
Display
Declaration
public EUIPSlider.DisplayFormat Display
Field Value
Declaration
public TMP_InputField InputField
Field Value
| Type |
Description |
| TMPro.TMP_InputField |
|
LabelText
Declaration
public TextMeshProUGUI LabelText
Field Value
| Type |
Description |
| TMPro.TextMeshProUGUI |
|
Declaration
public string NumberDisplayFormat
Field Value
| Type |
Description |
| System.String |
|
Methods
DoStateTransition(Selectable.SelectionState, Boolean)
Calls base UnityEngine.UI.Selectable.DoStateTransition(UnityEngine.UI.Selectable.SelectionState, System.Boolean) and updates InputField's interactable status as well.
Declaration
protected override void DoStateTransition(Selectable.SelectionState state, bool instant)
Parameters
| Type |
Name |
Description |
| UnityEngine.UI.Selectable.SelectionState |
state |
|
| System.Boolean |
instant |
|
Overrides
UnityEngine.UI.Selectable.DoStateTransition(UnityEngine.UI.Selectable.SelectionState, System.Boolean)
SetValue(String)
Sets the slider value to the provided value. Will auto-correct itself to be within the bounds of UnityEngine.UI.Slider.minValue / UnityEngine.UI.Slider.maxValue.
Also updates the InputField text or LabelText text depending on the Display
Does nothing if an invalid number is passed in.
Declaration
public void SetValue(string Text)
Parameters
| Type |
Name |
Description |
| System.String |
Text |
Must be a valid float. If not, this function does nothing.
|
Start()
Adds UnityEngine.UI.InputField.onEndEdit listener for the input field, and UnityEngine.UI.Slider.onValueChanged to the slider to update the LabelText and InputField.
Declaration
protected override void Start()
Overrides
UnityEngine.EventSystems.UIBehaviour.Start()
UpdateText(Single)
Declaration
public void UpdateText(float Value)
Parameters
| Type |
Name |
Description |
| System.Single |
Value |
|
Implements
UnityEngine.EventSystems.IMoveHandler
UnityEngine.EventSystems.IPointerDownHandler
UnityEngine.EventSystems.IPointerUpHandler
UnityEngine.EventSystems.IPointerEnterHandler
UnityEngine.EventSystems.IPointerExitHandler
UnityEngine.EventSystems.ISelectHandler
UnityEngine.EventSystems.IDeselectHandler
UnityEngine.EventSystems.IDragHandler
UnityEngine.EventSystems.IInitializePotentialDragHandler
UnityEngine.EventSystems.IEventSystemHandler
UnityEngine.UI.ICanvasElement