Sinespace Client
2023.2.17543
Client-side scripting for Sinespace
|
Public Member Functions | |
void | RefreshShownValue () |
Refreshes the text and image (if available) of the currently selected option. More... | |
void | AddOptions (string[] options) |
void | AddOptions (Table options) |
Add multiple options to the options of the Dropdown based on a list of OptionData objects. More... | |
void | AddOptions (SResource[] optionsSprites) |
Add multiple options to the options of the Dropdown based on a list of OptionData objects. More... | |
void | ClearOptions () |
Clear the list of options in the Dropdown. More... | |
void | Show () |
Show the dropdown list. More... | |
void | Hide () |
Hide the dropdown list. More... | |
void | OnValueChanged (Closure callback) |
A UnityEvent that is invoked when when a user has clicked one of the options in the dropdown list. More... | |
void | SetValueWithoutNotify (int value) |
Change the current value (selected item) of the dropdown, but do NOT call its OnValueChanged function. More... | |
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. More... | |
Properties | |
bool | Interactable [get, set] |
Will this component will accept input? More... | |
SGameObject | Template [get, set] |
The Rect Transform of the template for the dropdown list. More... | |
SUIText | CaptionText [get, set] |
The Text component to hold the text of the currently selected option. More... | |
SUIImage | CaptionImage [get, set] |
The Image component to hold the image of the currently selected option. More... | |
SUIText | ItemText [get, set] |
The Text component to hold the text of the item. More... | |
SUIImage | ItemImage [get, set] |
Get item image. More... | |
string[] | OptionsAsText [get] |
The list of possible options. More... | |
SResource[] | OptionsAsSprites [get] |
The list of possible options. Images can be specified for each option. More... | |
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. 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. More... | |
Properties inherited from ScriptClassComponent< Dropdown > | |
SGameObject | GameObject [get] |
Return the GameObject which component added. More... | |
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.