Sinespace Client 2025.3.19431
Client-side scripting for Sinespace
|
Public Member Functions | |
void | RefreshShownValue () |
Refreshes the text and image (if available) of the currently selected option. | |
void | AddOptions (string[] options) |
void | AddOptions (Table options) |
Add multiple options to the options of the Dropdown based on a list of OptionData objects. | |
void | AddOptions (SResource[] optionsSprites) |
Add multiple options to the options of the Dropdown based on a list of OptionData objects. | |
void | ClearOptions () |
Clear the list of options in the Dropdown. | |
void | Show () |
Show the dropdown list. | |
void | Hide () |
Hide the dropdown list. | |
void | OnValueChanged (Closure callback) |
A UnityEvent that is invoked when when a user has clicked one of the options in the dropdown list. | |
void | SetValueWithoutNotify (int value) |
Change the current value (selected item) of the dropdown, but do NOT call its OnValueChanged function. | |
bool | SetValueByText (string text) |
Attempts to set the dropdown to the first option in the dropdown list that matches the inputted text. Returns true if found, false if no matches found. | |
![]() | |
override void | Initialise (SScript runtime, object wrapper) |
![]() | |
void | ReportError (string error, bool fatal, UnityEngine.Object target=null) |
void | Initialise (SScript runtime, object wrapper) |
Properties | |
bool | Interactable [get, set] |
Will this component will accept input? | |
SGameObject | Template [get, set] |
The Rect Transform of the template for the dropdown list. | |
SUIText | CaptionText [get, set] |
The Text component to hold the text of the currently selected option. | |
SUIImage | CaptionImage [get, set] |
The Image component to hold the image of the currently selected option. | |
SUIText | ItemText [get, set] |
The Text component to hold the text of the item. | |
SUIImage | ItemImage [get, set] |
Get item image. | |
string[] | OptionsAsText [get] |
The list of possible options. | |
SResource[] | OptionsAsSprites [get] |
The list of possible options. Images can be specified for each option. | |
int | Value [get, set] |
The Value is the index number of the current selection in the Dropdown. 0 is the first option in the Dropdown, 1 is the second, and so on. | |
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. | |
![]() | |
SGameObject | GameObject [get] |
Return the GameObject which component added. | |
![]() | |
override bool | Alive [get] |
Return if the component is alive. | |
![]() | |
T | _wrap [get] |
![]() | |
virtual bool | Alive [get] |
DynValue | CachedData [get, set] |
Additional Inherited Members | |
![]() | |
void | Initialise (SScript runtime) |
void SineSpace.Scripting.Components.SUIDropdown.AddOptions | ( | SResource[] | optionsSprites | ) |
Add multiple options to the options of the Dropdown based on a list of OptionData objects.
optionsSprites | the optionsprites loaded from resource |
void SineSpace.Scripting.Components.SUIDropdown.AddOptions | ( | string[] | options | ) |
void SineSpace.Scripting.Components.SUIDropdown.AddOptions | ( | Table | options | ) |
Add multiple options to the options of the Dropdown based on a list of OptionData objects.
void SineSpace.Scripting.Components.SUIDropdown.ClearOptions | ( | ) |
Clear the list of options in the Dropdown.
void SineSpace.Scripting.Components.SUIDropdown.Hide | ( | ) |
void SineSpace.Scripting.Components.SUIDropdown.OnValueChanged | ( | Closure | callback | ) |
A UnityEvent that is invoked when when a user has clicked one of the options in the dropdown list.
void SineSpace.Scripting.Components.SUIDropdown.RefreshShownValue | ( | ) |
Refreshes the text and image (if available) of the currently selected option.
bool SineSpace.Scripting.Components.SUIDropdown.SetValueByText | ( | string | text | ) |
Attempts to set the dropdown to the first option in the dropdown list that matches the inputted text. Returns true if found, false if no matches found.
void SineSpace.Scripting.Components.SUIDropdown.SetValueWithoutNotify | ( | int | value | ) |
Change the current value (selected item) of the dropdown, but do NOT call its OnValueChanged function.
void SineSpace.Scripting.Components.SUIDropdown.Show | ( | ) |
|
getset |
The Image component to hold the image of the currently selected option.
|
getset |
The Text component to hold the text of the currently selected option.
|
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.
|
getset |
The color of the control when it is disabled.
|
getset |
The color of the control when it is highlighted.
|
getset |
Will this component will accept input?
|
getset |
|
getset |
|
getset |
The normal color of the control.
|
get |
The list of possible options. Images can be specified for each option.
|
get |
The list of possible options.
|
getset |
The color of the control when it is pressed.
|
getset |
The Rect Transform of the template for the dropdown list.
|
getset |
The Value is the index number of the current selection in the Dropdown. 0 is the first option in the Dropdown, 1 is the second, and so on.