Sinespace Client  2023.2.17543
Client-side scripting for Sinespace
SineSpace.Scripting.Components.SUIToggle Class Reference
Inheritance diagram for SineSpace.Scripting.Components.SUIToggle:
ScriptClassComponent< Toggle >

Public Member Functions

void SetIsOnWithoutNotify (bool value)
 Change the IsOn property of this toggle, but do NOT call OnValueChanged. More...
 
void OnValueChanged (Closure callback)
 Callback executed when the value of the toggle is changed. More...
 

Properties

bool Enabled [get, set]
 Enabled Behaviors are Updated; disabled Behaviors are not. More...
 
bool Interactable [get, set]
 Use to enable or disable the ability to select a selectable UI element. More...
 
bool IsOn [get, set]
 Return or set whether the Toggle is on or not. More...
 
SColor NormalColor [get, set]
 The normal color of the control More...
 
SColor HighlightedColor [get, set]
 The color of the control when it is highlighted More...
 
SColor PressedColor [get, set]
 The color of the control when it is pressed More...
 
SColor DisabledColor [get, set]
 The color of the control when it is disabled More...
 
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). More...
 
- Properties inherited from ScriptClassComponent< Toggle >
SGameObject GameObject [get]
 Return the GameObject which component added. More...
 

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())