summaryrefslogtreecommitdiffstats
path: root/scene/gui/menu_button.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/menu_button.h')
-rw-r--r--scene/gui/menu_button.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/scene/gui/menu_button.h b/scene/gui/menu_button.h
index eea6b8e877..2bd577ddd0 100644
--- a/scene/gui/menu_button.h
+++ b/scene/gui/menu_button.h
@@ -33,6 +33,7 @@
#include "scene/gui/button.h"
#include "scene/gui/popup_menu.h"
+#include "scene/property_list_helper.h"
class MenuButton : public Button {
GDCLASS(MenuButton, Button);
@@ -42,13 +43,18 @@ class MenuButton : public Button {
bool disable_shortcuts = false;
PopupMenu *popup = nullptr;
+ static inline PropertyListHelper base_property_helper;
+ PropertyListHelper property_helper;
+
void _popup_visibility_changed(bool p_visible);
protected:
void _notification(int p_what);
bool _set(const StringName &p_name, const Variant &p_value);
bool _get(const StringName &p_name, Variant &r_ret) const;
- void _get_property_list(List<PropertyInfo> *p_list) const;
+ void _get_property_list(List<PropertyInfo> *p_list) const { property_helper.get_property_list(p_list, popup->get_item_count()); }
+ bool _property_can_revert(const StringName &p_name) const { return property_helper.property_can_revert(p_name); }
+ bool _property_get_revert(const StringName &p_name, Variant &r_property) const { return property_helper.property_get_revert(p_name, r_property); }
static void _bind_methods();
virtual void shortcut_input(const Ref<InputEvent> &p_event) override;