summaryrefslogtreecommitdiff
path: root/scene/gui/item_list.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-01-15 16:24:20 +0100
committerGitHub <noreply@github.com>2021-01-15 16:24:20 +0100
commit1ffe3ed47a32fdd4dceb32685a4a36aeb7ec2757 (patch)
tree1dc585f7ebb589daa37b18e0de897d734f6f12ab /scene/gui/item_list.h
parent8cd11032fbbd14cf3f82a1441f1e02d0a1d9c54e (diff)
parentc36be14e3c017b3e27d2441603ac63ceb7eeaa2d (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 'scene/gui/item_list.h')
-rw-r--r--scene/gui/item_list.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index d08823c398..4982a68071 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -130,8 +130,8 @@ protected:
static void _bind_methods();
public:
- void add_item(const String &p_item, const Ref<Texture2D> &p_texture = Ref<Texture2D>(), bool p_selectable = true);
- void add_icon_item(const Ref<Texture2D> &p_item, bool p_selectable = true);
+ int add_item(const String &p_item, const Ref<Texture2D> &p_texture = Ref<Texture2D>(), bool p_selectable = true);
+ int add_icon_item(const Ref<Texture2D> &p_item, bool p_selectable = true);
void set_item_text(int p_idx, const String &p_text);
String get_item_text(int p_idx) const;