diff options
Diffstat (limited to 'editor/plugins/control_editor_plugin.h')
-rw-r--r-- | editor/plugins/control_editor_plugin.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/editor/plugins/control_editor_plugin.h b/editor/plugins/control_editor_plugin.h index 4a411c0241..2672e8ef97 100644 --- a/editor/plugins/control_editor_plugin.h +++ b/editor/plugins/control_editor_plugin.h @@ -32,7 +32,7 @@ #define CONTROL_EDITOR_PLUGIN_H #include "editor/editor_inspector.h" -#include "editor/editor_plugin.h" +#include "editor/plugins/editor_plugin.h" #include "scene/gui/box_container.h" #include "scene/gui/button.h" #include "scene/gui/check_box.h" @@ -45,6 +45,7 @@ #include "scene/gui/separator.h" #include "scene/gui/texture_rect.h" +class CheckButton; class EditorSelection; class GridContainer; @@ -127,8 +128,11 @@ public: class EditorInspectorPluginControl : public EditorInspectorPlugin { GDCLASS(EditorInspectorPluginControl, EditorInspectorPlugin); + bool inside_control_category = false; + public: virtual bool can_handle(Object *p_object) override; + virtual void parse_category(Object *p_object, const String &p_category) override; virtual void parse_group(Object *p_object, const String &p_group) override; virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override; }; @@ -188,11 +192,12 @@ public: class SizeFlagPresetPicker : public ControlEditorPresetPicker { GDCLASS(SizeFlagPresetPicker, ControlEditorPresetPicker); - CheckBox *expand_button = nullptr; + CheckButton *expand_button = nullptr; bool vertical = false; virtual void _preset_button_pressed(const int p_preset) override; + void _expand_button_pressed(); protected: void _notification(int p_notification); @@ -200,6 +205,7 @@ protected: public: void set_allowed_flags(Vector<SizeFlags> &p_flags); + void set_expand_flag(bool p_expand); SizeFlagPresetPicker(bool p_vertical); }; @@ -222,6 +228,7 @@ class ControlEditorToolbar : public HBoxContainer { void _anchors_to_current_ratio(); void _anchor_mode_toggled(bool p_status); void _container_flags_selected(int p_flags, bool p_vertical); + void _expand_flag_toggled(bool p_expand, bool p_vertical); Vector2 _position_to_anchor(const Control *p_control, Vector2 position); bool _is_node_locked(const Node *p_node); |