Class ToggleSlider
A ThemeElement Toggle in the form of a boolean slider.
Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
UnityEngine.EventSystems.UIBehaviour
UnityEngine.UI.Selectable
UnityEngine.UI.Toggle
ToggleSlider
Implements
Inherited Members
Namespace: AdrianMiasik.Components.Core
Assembly: Assembly-CSharp.dll
Syntax
public class ToggleSlider : Toggle, IMoveHandler, IPointerDownHandler, IPointerUpHandler, IPointerEnterHandler, IPointerExitHandler, ISelectHandler, IDeselectHandler, IPointerClickHandler, ISubmitHandler, IEventSystemHandler, ICanvasElement, IColorHook
Fields
| Improve this Doc View Sourcem_background
Declaration
[SerializeField]
public SVGImage m_background
Field Value
Type | Description |
---|---|
Unity.VectorGraphics.SVGImage |
m_dot
Declaration
[SerializeField]
public SVGImage m_dot
Field Value
Type | Description |
---|---|
Unity.VectorGraphics.SVGImage |
m_onClick
Declaration
public UnityEvent m_onClick
Field Value
Type | Description |
---|---|
UnityEngine.Events.UnityEvent |
m_onSetToFalseClick
Declaration
public UnityEvent m_onSetToFalseClick
Field Value
Type | Description |
---|---|
UnityEngine.Events.UnityEvent |
m_onSetToTrueClick
Declaration
public UnityEvent m_onSetToTrueClick
Field Value
Type | Description |
---|---|
UnityEngine.Events.UnityEvent |
Methods
| Improve this Doc View SourceColorUpdate(Theme)
Declaration
public override void ColorUpdate(Theme theme)
Parameters
Type | Name | Description |
---|---|---|
Theme | theme |
Overrides
| Improve this Doc View SourceEnableAnimation()
Declaration
public void EnableAnimation()
Initialize(PomodoroTimer, Boolean)
Declaration
public void Initialize(PomodoroTimer timer, bool state)
Parameters
Type | Name | Description |
---|---|---|
PomodoroTimer | timer | |
System.Boolean | state |
IsOn()
Declaration
public bool IsOn()
Returns
Type | Description |
---|---|
System.Boolean |
OnPointerClick(PointerEventData)
Declaration
public override void OnPointerClick(PointerEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.EventSystems.PointerEventData | eventData |
Overrides
UnityEngine.UI.Toggle.OnPointerClick(UnityEngine.EventSystems.PointerEventData)
|
Improve this Doc
View Source
OverrideDotColor(Color)
Declaration
public void OverrideDotColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Color | color |
OverrideFalseColor(Color)
Note: Needs to be invoked before initialize.Initialize(PomodoroTimer, Boolean)
Declaration
public void OverrideFalseColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Color | color |
OverrideTrueColor(Color)
Declaration
public void OverrideTrueColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Color | color |
Press()
Changes the visibility of the boolean slider to the ON or OFF position. Position depends on current state.
Declaration
public void Press()
Refresh(Boolean)
Declaration
public void Refresh(bool state)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | state |
SetEditorVisualToDisable()
Declaration
[ContextMenu("Disable (Editor)")]
public void SetEditorVisualToDisable()
SetEditorVisualToEnable()
Declaration
[ContextMenu("Enable (Editor)")]
public void SetEditorVisualToEnable()
SetVisualToDisable()
Declaration
[ContextMenu("Disable (Run-time)")]
public void SetVisualToDisable()
SetVisualToEnable()
Declaration
[ContextMenu("Enable (Run-time)")]
public void SetVisualToEnable()