summaryrefslogtreecommitdiff
path: root/editor/editor_inspector.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_inspector.h')
-rw-r--r--editor/editor_inspector.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index baba9ec1f4..474078853a 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -31,6 +31,7 @@
#ifndef EDITOR_INSPECTOR_H
#define EDITOR_INSPECTOR_H
+#include "editor/editor_undo_redo_manager.h"
#include "editor_property_name_processor.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
@@ -42,8 +43,6 @@
#include "scene/gui/spin_box.h"
#include "scene/gui/texture_rect.h"
-class UndoRedo;
-
class EditorPropertyRevert {
public:
static bool get_instantiated_node_original_property(Node *p_node, const StringName &p_prop, Variant &value, bool p_check_class_default = true);
@@ -118,8 +117,6 @@ private:
Control *bottom_editor = nullptr;
PopupMenu *menu = nullptr;
- mutable String tooltip_text;
-
HashMap<StringName, Variant> cache;
GDVIRTUAL0(_update_property)
@@ -200,8 +197,6 @@ public:
void set_object_and_property(Object *p_object, const StringName &p_property);
virtual Control *make_custom_tooltip(const String &p_text) const override;
- String get_tooltip_text() const;
-
void set_draw_top_bg(bool p_draw) { draw_top_bg = p_draw; }
bool can_revert_to_default() const { return can_revert; }
@@ -255,18 +250,13 @@ class EditorInspectorCategory : public Control {
Ref<Texture2D> icon;
String label;
- mutable String tooltip_text;
-
protected:
void _notification(int p_what);
- static void _bind_methods();
public:
virtual Size2 get_minimum_size() const override;
virtual Control *make_custom_tooltip(const String &p_text) const override;
- String get_tooltip_text() const;
-
EditorInspectorCategory();
};
@@ -313,7 +303,7 @@ public:
class EditorInspectorArray : public EditorInspectorSection {
GDCLASS(EditorInspectorArray, EditorInspectorSection);
- UndoRedo *undo_redo = nullptr;
+ Ref<EditorUndoRedoManager> undo_redo;
enum Mode {
MODE_NONE,
@@ -408,7 +398,7 @@ protected:
static void _bind_methods();
public:
- void set_undo_redo(UndoRedo *p_undo_redo);
+ void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
void setup_with_move_element_function(Object *p_object, String p_label, const StringName &p_array_element_prefix, int p_page, const Color &p_bg_color, bool p_foldable, bool p_movable = true, bool p_numbered = false, int p_page_length = 5, const String &p_add_item_text = "");
void setup_with_count_property(Object *p_object, String p_label, const StringName &p_count_property, const StringName &p_array_element_prefix, int p_page, const Color &p_bg_color, bool p_foldable, bool p_movable = true, bool p_numbered = false, int p_page_length = 5, const String &p_add_item_text = "", const String &p_swap_method = "");
@@ -448,7 +438,7 @@ public:
class EditorInspector : public ScrollContainer {
GDCLASS(EditorInspector, ScrollContainer);
- UndoRedo *undo_redo = nullptr;
+ Ref<EditorUndoRedoManager> undo_redo;
enum {
MAX_PLUGINS = 1024
};
@@ -562,7 +552,7 @@ public:
static EditorProperty *instantiate_property_editor(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false);
- void set_undo_redo(UndoRedo *p_undo_redo);
+ void set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo);
String get_selected_path() const;