Sinespace Client 2025.3.19431
Client-side scripting for Sinespace
SineSpace.Scripting.Components.SUIToggle Class Reference
Inheritance diagram for SineSpace.Scripting.Components.SUIToggle:
ScriptClassComponent< T > ScriptClass< T > ScriptClassWrapper< T > ScriptClass

Public Member Functions

void SetIsOnWithoutNotify (bool value)
 Change the IsOn property of this toggle, but do NOT call OnValueChanged.
 
void OnValueChanged (Closure callback)
 Callback executed when the value of the toggle is changed.
 
- Public Member Functions inherited from ScriptClassWrapper< T >
override void Initialise (SScript runtime, object wrapper)
 
- Public Member Functions inherited from ScriptClass
void ReportError (string error, bool fatal, UnityEngine.Object target=null)
 
void Initialise (SScript runtime, object wrapper)
 

Properties

bool Enabled [get, set]
 Enabled Behaviors are Updated; disabled Behaviors are not.
 
bool Interactable [get, set]
 Use to enable or disable the ability to select a selectable UI element.
 
bool IsOn [get, set]
 Return or set whether the Toggle is on or not.
 
SColor NormalColor [get, set]
 The normal color of the control.
 
SColor HighlightedColor [get, set]
 The color of the control when it is highlighted.
 
SColor PressedColor [get, set]
 The color of the control when it is pressed.
 
SColor DisabledColor [get, set]
 The color of the control when it is disabled.
 
float ColorMultiplier [get, set]
 This multiplies the tint color for each transition by its value. With this you can create colors greater than 1 to brighten the colors on graphic elements whose base color is less than white (or less than full alpha).
 
- Properties inherited from ScriptClassComponent< T >
SGameObject GameObject [get]
 Return the GameObject which component added.
 
- Properties inherited from ScriptClass< T >
override bool Alive [get]
 Return if the component is alive.
 
- Properties inherited from ScriptClassWrapper< T >
_wrap [get]
 
- Properties inherited from ScriptClass
virtual bool Alive [get]
 
DynValue CachedData [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from ScriptClass
void Initialise (SScript runtime)
 

Member Function Documentation

◆ OnValueChanged()

void SineSpace.Scripting.Components.SUIToggle.OnValueChanged ( Closure callback)

Callback executed when the value of the toggle is changed.

local toggle=Space.Host.GetReference("Toggle").UIToggle
toggle.OnValueChanged(function ()
Space.Log("Hello Lua!!")
end)

◆ SetIsOnWithoutNotify()

void SineSpace.Scripting.Components.SUIToggle.SetIsOnWithoutNotify ( bool value)

Change the IsOn property of this toggle, but do NOT call OnValueChanged.

local toggle=Space.Host.GetReference("Toggle").UIToggle
toggle.SetIsOnWithoutNotify(true)

Property Documentation

◆ ColorMultiplier

float SineSpace.Scripting.Components.SUIToggle.ColorMultiplier
getset

This multiplies the tint color for each transition by its value. With this you can create colors greater than 1 to brighten the colors on graphic elements whose base color is less than white (or less than full alpha).

local toggle=Space.Host.GetReference("Toggle").UIToggle
Space.Log(toggle.ColorMultiplier)

◆ DisabledColor

SColor SineSpace.Scripting.Components.SUIToggle.DisabledColor
getset

The color of the control when it is disabled.

local toggle=Space.Host.GetReference("Toggle").UIToggle
Space.Log(toggle.DisabledColor.ToString())

◆ Enabled

bool SineSpace.Scripting.Components.SUIToggle.Enabled
getset

Enabled Behaviors are Updated; disabled Behaviors are not.

local toggle=Space.Host.GetReference("Toggle").UIToggle
Space.Log(toggle.Enabled)

◆ HighlightedColor

SColor SineSpace.Scripting.Components.SUIToggle.HighlightedColor
getset

The color of the control when it is highlighted.

local toggle=Space.Host.GetReference("Toggle").UIToggle
Space.Log(toggle.HighlightedColor.ToString())

◆ Interactable

bool SineSpace.Scripting.Components.SUIToggle.Interactable
getset

Use to enable or disable the ability to select a selectable UI element.

local toggle=Space.Host.GetReference("Toggle").UIToggle
Space.Log(toggle.Interactable)

◆ IsOn

bool SineSpace.Scripting.Components.SUIToggle.IsOn
getset

Return or set whether the Toggle is on or not.

local toggle=Space.Host.GetReference("Toggle").UIToggle
Space.Log(toggle.IsOn)

◆ NormalColor

SColor SineSpace.Scripting.Components.SUIToggle.NormalColor
getset

The normal color of the control.

local toggle=Space.Host.GetReference("Toggle").UIToggle
Space.Log(toggle.NormalColor.ToString())

◆ PressedColor

SColor SineSpace.Scripting.Components.SUIToggle.PressedColor
getset

The color of the control when it is pressed.

local toggle=Space.Host.GetReference("Toggle").UIToggle
Space.Log(toggle.PressedColor.ToString())