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.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index dccbdb9a73..44cc56b543 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -37,6 +37,15 @@
class UndoRedo;
+class EditorPropertyRevert {
+public:
+ static bool may_node_be_in_instance(Node *p_node);
+ static bool get_instanced_node_original_property(Node *p_node, const StringName &p_prop, Variant &value);
+ static bool is_node_property_different(Node *p_node, const Variant &p_current, const Variant &p_orig);
+
+ static bool can_property_revert(Object *p_object, const StringName &p_property);
+};
+
class EditorProperty : public Container {
GDCLASS(EditorProperty, Container)
@@ -70,9 +79,7 @@ private:
bool use_folding;
bool draw_top_bg;
- bool _might_be_in_instance();
- bool _is_property_different(const Variant &p_current, const Variant &p_orig, int p_usage);
- bool _is_instanced_node_with_original_property_different();
+ bool _is_property_different(const Variant &p_current, const Variant &p_orig);
bool _get_instanced_node_original_property(const StringName &p_prop, Variant &value);
void _focusable_focused(int p_index);
@@ -152,6 +159,8 @@ public:
void set_draw_top_bg(bool p_draw) { draw_top_bg = p_draw; }
+ bool can_revert_to_default() const { return can_revert; }
+
EditorProperty();
};
@@ -293,8 +302,8 @@ class EditorInspector : public ScrollContainer {
void _property_changed(const String &p_path, const Variant &p_value, bool changing = false);
void _property_changed_update_all(const String &p_path, const Variant &p_value);
void _multiple_properties_changed(Vector<String> p_paths, Array p_values);
- void _property_keyed(const String &p_path);
- void _property_keyed_with_value(const String &p_path, const Variant &p_value);
+ 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_checked(const String &p_path, bool p_checked);