void RefreshShownValue ()
Refreshes the text and image (if available) of the currently selected option.If you have modified the list of options, you should call this method afterwards to ensure that the visual state of the dropdown corresponds to the updated options.
void AddOptions (string[] options) void AddOptions (Table options) void AddOptions (SResource[] optionsSprites)
Add multiple options to the options of the Dropdown.
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)
Bind a function to handle the event that is invoked when when a user has clicked one of the options in the dropdown list.
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.
bool Interactable get
set
Is this UIDropdown interactable?
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
The Image component to hold the image of the item.
string[] OptionsAsText get
The list of possible options. (Text)
SResource[] OptionsAsSprites get
The list of possible options. (Sprites)
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
Property Description
SColor HighlightedColor get
set
Property Description
SColor PressedColor get
set
Property Description
SColor DisabledColor get
set
Property Description
float ColorMultiplier get
set
Property Description
SGameObject GameObject get
Property Description
Function Name |
---|
Property Name |
---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
void RefreshShownValue ()
void AddOptions (string[] options) void AddOptions (Table options) void AddOptions (SResource[] optionsSprites)
void ClearOptions ()
void Show ()
void Hide ()
void OnValueChanged (Closure callback)
bool Interactable get
set
SGameObject Template get
set
SUIText CaptionText get
set
SUIImage CaptionImage get
set
SUIText ItemText get
set
SUIImage ItemImage get
set
string[] OptionsAsText get
SResource[] OptionsAsSprites get
int Value get
set
SColor NormalColor get
set
SColor HighlightedColor get
set
SColor PressedColor get
set
SColor DisabledColor get
set
float ColorMultiplier get
set
SGameObject GameObject get