Button control that provides selectable options when pressed.
OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text.
Add an item, with a "texture" icon, text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end.
Add an item, with text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end.
Add a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end.
Clear all the items in the [code]OptionButton[/code].
Return the amount of items in the OptionButton.
Return the icon of the item at index "idx".
Return the ID of the item at index "idx".
Return the text of the item at index "idx".
Return the current item index
Select an item by index and make it the current item.
Set the icon of an item at index "idx".
Set the ID of an item at index "idx".
Set the text of an item at index "idx".
This signal is emitted when the current item was changed by the user. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index).