diff options
Diffstat (limited to 'scene/gui/option_button.h')
-rw-r--r-- | scene/gui/option_button.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/scene/gui/option_button.h b/scene/gui/option_button.h index 121b4c002d..7210708042 100644 --- a/scene/gui/option_button.h +++ b/scene/gui/option_button.h @@ -33,9 +33,7 @@ #include "scene/gui/button.h" #include "scene/gui/popup_menu.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ + class OptionButton : public Button { GDCLASS(OptionButton, Button); @@ -59,18 +57,19 @@ protected: static void _bind_methods(); public: - void add_icon_item(const Ref<Texture> &p_icon, const String &p_label, int p_ID = -1); - void add_item(const String &p_label, int p_ID = -1); + void add_icon_item(const Ref<Texture> &p_icon, const String &p_label, int p_id = -1); + void add_item(const String &p_label, int p_id = -1); void set_item_text(int p_idx, const String &p_text); void set_item_icon(int p_idx, const Ref<Texture> &p_icon); - void set_item_id(int p_idx, int p_ID); + void set_item_id(int p_idx, int p_id); void set_item_metadata(int p_idx, const Variant &p_metadata); void set_item_disabled(int p_idx, bool p_disabled); String get_item_text(int p_idx) const; Ref<Texture> get_item_icon(int p_idx) const; int get_item_id(int p_idx) const; + int get_item_index(int p_id) const; Variant get_item_metadata(int p_idx) const; bool is_item_disabled(int p_idx) const; |