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

Public Member Functions

void OnClick (Closure callback)
 Invoke when a user clicks the button and releases it. More...
 

Properties

bool Enabled [get, set]
 Whether the button component is Enabled or not. More...
 
bool Interactable [get, set]
 Enable Interactable. 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. More...
 
- Properties inherited from ScriptClassComponent< Button >
SGameObject GameObject [get]
 Return the GameObject which component added. More...
 

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
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)
SineSpace.Scripting.Components.SUIButton.OnClick
void OnClick(Closure callback)
Invoke when a user clicks the button and releases it.
Definition: SUIButton.cs:64