diff options
Diffstat (limited to 'editor/editor_inspector.h')
-rw-r--r-- | editor/editor_inspector.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index b49a4424f6..c8c1ecc49a 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -64,6 +64,7 @@ private: bool checked; bool draw_red; bool keying; + bool deletable; Rect2 right_child_rect; Rect2 bottom_child_rect; @@ -74,6 +75,8 @@ private: bool revert_hover; Rect2 check_rect; bool check_hover; + Rect2 delete_rect; + bool delete_hover; bool can_revert; @@ -133,6 +136,8 @@ public: void set_keying(bool p_keying); bool is_keying() const; + void set_deletable(bool p_enable); + bool is_deletable() const; void add_focusable(Control *p_control); void select(int p_focusable = -1); void deselect(); @@ -190,7 +195,7 @@ public: virtual bool can_handle(Object *p_object); virtual void parse_begin(Object *p_object); virtual void parse_category(Object *p_object, const String &p_parse_category); - virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage); + virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide = false); virtual void parse_end(); }; @@ -283,6 +288,8 @@ class EditorInspector : public ScrollContainer { bool read_only; bool keying; bool sub_inspector; + bool wide_editors; + bool deletable_properties; float refresh_countdown; bool update_tree_pending; @@ -307,6 +314,7 @@ class EditorInspector : public ScrollContainer { void _multiple_properties_changed(Vector<String> p_paths, Array p_values); void _property_keyed(const String &p_path, bool p_advance); void _property_keyed_with_value(const String &p_path, const Variant &p_value, bool p_advance); + void _property_deleted(const String &p_path); void _property_checked(const String &p_path, bool p_checked); @@ -337,7 +345,7 @@ public: static void remove_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin); static void cleanup_plugins(); - static EditorProperty *instantiate_property_editor(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage); + static EditorProperty *instantiate_property_editor(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide = false); void set_undo_redo(UndoRedo *p_undo_redo); @@ -380,8 +388,11 @@ public: void set_object_class(const String &p_class); String get_object_class() const; + void set_use_wide_editors(bool p_enable); void set_sub_inspector(bool p_enable); + void set_use_deletable_properties(bool p_enabled); + EditorInspector(); }; |