diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index b3f1359e694..0debb988ce6 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -19,7 +19,7 @@
- Adds an item, with a [code]texture[/code] icon, text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, [code]id[/code] becomes the item index. New items are appended at the end.
+ Adds an item, with a [code]texture[/code] icon, text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, the item index will be used as the item's ID. New items are appended at the end.
@@ -30,7 +30,7 @@
- Adds an item, with text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, [code]id[/code] becomes the item index. New items are appended at the end.
+ Adds an item, with text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, the item index will be used as the item's ID. New items are appended at the end.
@@ -44,14 +44,14 @@
- Clear all the items in the [OptionButton].
+ Clears all the items in the [OptionButton].
- Returns the amount of items in the OptionButton.
+ Returns the amount of items in the OptionButton, including separators.
@@ -87,6 +87,7 @@
+ Retrieves the metadata of an item. Metadata may be any type and can be used to store extra information about an item, such as an external string ID.
@@ -109,12 +110,14 @@
+ Returns the ID of the selected item, or [code]0[/code] if no item is selected.
+ Gets the metadata of the selected item. Metadata for items can be set using [method set_item_metadata].
@@ -123,6 +126,7 @@
+ Returns [code]true[/code] if the item at index [code]idx[/code] is disabled.
@@ -131,6 +135,7 @@
+ Removes the item at index [code]idx[/code].
@@ -139,7 +144,7 @@
- Select an item by index and make it the current item.
+ Selects an item by index and makes it the current item. This will work even if the item is disabled.
@@ -150,6 +155,8 @@
+ Sets whether the item at index [code]idx[/code] is disabled.
+ Disabled items are drawn differently in the dropdown and are not selectable by the user. If the current selected item is set as disabled, it will remain selected.
@@ -160,7 +167,7 @@
- Sets the icon of an item at index [code]idx[/code].
+ Sets the icon of the item at index [code]idx[/code].
@@ -171,7 +178,7 @@
- Sets the ID of an item at index [code]idx[/code].
+ Sets the ID of the item at index [code]idx[/code].
@@ -182,6 +189,7 @@
+ Sets the metadata of an item. Metadata may be of any type and can be used to store extra information about an item, such as an external string ID.
@@ -192,7 +200,7 @@
- Sets the text of an item at index [code]idx[/code].
+ Sets the text of the item at index [code]idx[/code].
@@ -200,6 +208,7 @@
+ The index of the currently selected item, or [code]-1[/code] if no item is selected.