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

Public Member Functions

void OnClick (Closure callback)
 Invoke when a user clicks the button and releases it.
 
- 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]
 Whether the button component is Enabled or not.
 
bool Interactable [get, set]
 Enable Interactable.
 
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.
 
- 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

◆ OnClick()

void SineSpace.Scripting.Components.SUIButton.OnClick ( Closure callback)

Invoke when a user clicks the button and releases it.

local button=Space.Host.GetReference("Button").UIButton
&ndash;add Button to object references.
function Click()
button.OnClick(function () <br>
Space.Log("Hello Lua!")
end)
end
void OnClick(Closure callback)
Invoke when a user clicks the button and releases it.
Definition SUIButton.cs:64
Parameters
callbackthe script function named "callback"

Property Documentation

◆ ColorMultiplier

float SineSpace.Scripting.Components.SUIButton.ColorMultiplier
getset

This multiplies the tint color for each transition by its value.

local button=Space.Host.GetReference("Button").UIButton
&ndash;add Button to object references.
Space.Log(button.ColorMultiplier)
&ndash;print 1.

◆ DisabledColor

SColor SineSpace.Scripting.Components.SUIButton.DisabledColor
getset

The color of the control when it is disabled.

local button=Space.Host.GetReference("Button").UIButton
&ndash;add Button to object references.
Space.Log(button.DisabledColor)

◆ Enabled

bool SineSpace.Scripting.Components.SUIButton.Enabled
getset

Whether the button component is Enabled or not.

local button=Space.Host.GetReference("Button").UIButton
&ndash;add Button to object references.
Space.Log(button.Enabled)
&ndash;return true.

◆ HighlightedColor

SColor SineSpace.Scripting.Components.SUIButton.HighlightedColor
getset

The color of the control when it is highlighted.

local button=Space.Host.GetReference("Button").UIButton
&ndash;add Button to object references.
Space.Log(button.HighlightedColor)

◆ Interactable

bool SineSpace.Scripting.Components.SUIButton.Interactable
getset

Enable Interactable.

local button=Space.Host.GetReference("Button").UIButton
&ndash;add Button to object references.
Space.Log(button.Interactable)
&ndash;return true.

◆ NormalColor

SColor SineSpace.Scripting.Components.SUIButton.NormalColor
getset

The normal color of the control.

local button=Space.Host.GetReference("Button").UIButton
&ndash;add Button to object references.
Space.Log(button.NormalColor)

◆ PressedColor

SColor SineSpace.Scripting.Components.SUIButton.PressedColor
getset

The color of the control when it is pressed.

local button=Space.Host.GetReference("Button").UIButton
&ndash;add Button to object references.
Space.Log(button.PressedColor)