diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-01-15 16:24:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-15 16:24:20 +0100 |
commit | 1ffe3ed47a32fdd4dceb32685a4a36aeb7ec2757 (patch) | |
tree | 1dc585f7ebb589daa37b18e0de897d734f6f12ab /doc/classes | |
parent | 8cd11032fbbd14cf3f82a1441f1e02d0a1d9c54e (diff) | |
parent | c36be14e3c017b3e27d2441603ac63ceb7eeaa2d (diff) |
Merge pull request #33685 from Scony/improve-item-lists-add-item-methods
ItemList's add_(icon_)item method returns id of added item
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/ItemList.xml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 6e5ff83a35..2c322027e7 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -12,18 +12,18 @@ </tutorials> <methods> <method name="add_icon_item"> - <return type="void"> + <return type="int"> </return> <argument index="0" name="icon" type="Texture2D"> </argument> <argument index="1" name="selectable" type="bool" default="true"> </argument> <description> - Adds an item to the item list with no text, only an icon. + Adds an item to the item list with no text, only an icon. Returns the index of an added item. </description> </method> <method name="add_item"> - <return type="void"> + <return type="int"> </return> <argument index="0" name="text" type="String"> </argument> @@ -32,7 +32,8 @@ <argument index="2" name="selectable" type="bool" default="true"> </argument> <description> - Adds an item to the item list with specified text. Specify an [code]icon[/code], or use [code]null[/code] as the [code]icon[/code] for a list item with no icon. + Adds an item to the item list with specified text. Returns the index of an added item. + Specify an [code]icon[/code], or use [code]null[/code] as the [code]icon[/code] for a list item with no icon. If selectable is [code]true[/code], the list item will be selectable. </description> </method> |