diff options
Diffstat (limited to 'doc/classes/OptionButton.xml')
-rw-r--r-- | doc/classes/OptionButton.xml | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index f65925f0f6..a7b1f0ea33 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -6,6 +6,7 @@ <description> 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. See also [BaseButton] which contains common properties and methods associated with this node. + [b]Note:[/b] Properties [member Button.text] and [member Button.icon] are automatically set based on the selected item. They shouldn't be changed manually. </description> <tutorials> </tutorials> @@ -29,8 +30,9 @@ </method> <method name="add_separator"> <return type="void" /> + <argument index="0" name="text" type="String" default="""" /> <description> - Adds a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end. + Adds a separator to the list of items. Separators help to group items, and can optionally be given a [code]text[/code] header. A separator also gets an index assigned, and is appended at the end of the item list. </description> </method> <method name="clear"> @@ -74,6 +76,13 @@ Returns the text of the item at index [code]idx[/code]. </description> </method> + <method name="get_item_tooltip" qualifiers="const"> + <return type="String" /> + <argument index="0" name="idx" type="int" /> + <description> + Returns the tooltip of the item at index [code]idx[/code]. + </description> + </method> <method name="get_popup" qualifiers="const"> <return type="PopupMenu" /> <description> @@ -81,6 +90,12 @@ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property. </description> </method> + <method name="get_selectable_item" qualifiers="const"> + <return type="int" /> + <argument index="0" name="from_last" type="bool" default="false" /> + <description> + </description> + </method> <method name="get_selected_id" qualifiers="const"> <return type="int" /> <description> @@ -93,6 +108,11 @@ Gets the metadata of the selected item. Metadata for items can be set using [method set_item_metadata]. </description> </method> + <method name="has_selectable_items" qualifiers="const"> + <return type="bool" /> + <description> + </description> + </method> <method name="is_item_disabled" qualifiers="const"> <return type="bool" /> <argument index="0" name="idx" type="int" /> @@ -100,6 +120,12 @@ Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. </description> </method> + <method name="is_item_separator" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> + <description> + </description> + </method> <method name="remove_item"> <return type="void" /> <argument index="0" name="idx" type="int" /> @@ -156,6 +182,14 @@ Sets the text of the item at index [code]idx[/code]. </description> </method> + <method name="set_item_tooltip"> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="tooltip" type="String" /> + <description> + Sets the tooltip of the item at index [code]idx[/code]. + </description> + </method> </methods> <members> <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" /> @@ -204,7 +238,7 @@ <theme_item name="arrow_margin" data_type="constant" type="int" default="4"> The horizontal space between the arrow icon and the right edge of the button. </theme_item> - <theme_item name="hseparation" data_type="constant" type="int" default="2"> + <theme_item name="h_separation" data_type="constant" type="int" default="2"> The horizontal space between [OptionButton]'s icon and text. </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> |