summaryrefslogtreecommitdiffstats
path: root/scene/gui/popup_menu.h
diff options
context:
space:
mode:
authorIvan P. Skodje <Tybobobo@users.noreply.github.com>2016-12-23 15:43:45 +0100
committerRémi Verschelde <rverschelde@gmail.com>2016-12-23 15:43:45 +0100
commitda950cd0f27a4f1f2a2d596efae846d1c22442a2 (patch)
tree74595ac5affca7325782cf7c2244d29fe79de723 /scene/gui/popup_menu.h
parent2c8a1729152f5bcb1cb81d24b1e642634bff7174 (diff)
downloadredot-engine-da950cd0f27a4f1f2a2d596efae846d1c22442a2.tar.gz
PopupMenu upgrade: Hide on item selection (#7306)
* Added the option to set hide on item selection. Usable in GDScript and from within the source code when you want to specify popup menus you don't want to close immediately when selecting an item * Renamed getter from get_ to is_, fixed parent/child behavior, renamed bool variable to match most code and added ADD_PROPERTYNO to save some memory
Diffstat (limited to 'scene/gui/popup_menu.h')
-rw-r--r--scene/gui/popup_menu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h
index b3e8cd2713..56ab8ad9dc 100644
--- a/scene/gui/popup_menu.h
+++ b/scene/gui/popup_menu.h
@@ -74,6 +74,7 @@ class PopupMenu : public Popup {
void _submenu_timeout();
bool invalidated_click;
+ bool hide_on_item_selection;
Vector2 moved;
Array _get_items() const;
@@ -153,6 +154,8 @@ public:
void clear_autohide_areas();
void set_invalidate_click_until_motion();
+ void set_hide_on_item_selection(bool p_enabled);
+ bool is_hide_on_item_selection();
PopupMenu();
~PopupMenu();