Dropdown#
-
class Dropdown#
A control for choosing one of a list of options, which are shown when it is clicked. Added to a
Canvasor aPanel.Base class:InputControlInherited Members
From
InputControl:changed,set_changedFrom
Control:interactable,set_interactable,color,set_color,tooltip,set_tooltipFrom
Object:rect_transform,layout_element,visible,set_visible,remove
-
std::vector<std::string> options()#
-
void set_options(std::vector<std::string> value)#
The options that the dropdown offers.
Note
Setting the options resets the selection to the first of them, or to nothing when the list is empty.
-
int32_t selected_index()#
-
void set_selected_index(int32_t value)#
The position in
Dropdown::options()of the option that is chosen.Note
Zero while the dropdown has no options, as there is nothing to choose.