diff options
Diffstat (limited to 'editor/editor_settings.h')
-rw-r--r-- | editor/editor_settings.h | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/editor/editor_settings.h b/editor/editor_settings.h index 29b89ef1a8..13aebb7ea6 100644 --- a/editor/editor_settings.h +++ b/editor/editor_settings.h @@ -42,7 +42,6 @@ class EditorPlugin; class EditorSettings : public Resource { - GDCLASS(EditorSettings, Resource); private: @@ -50,7 +49,6 @@ private: public: struct Plugin { - EditorPlugin *instance; String path; String name; @@ -64,27 +62,19 @@ public: private: struct VariantContainer { - int order; + int order = 0; Variant variant; Variant initial; - bool has_default_value; - bool hide_from_editor; - bool save; - bool restart_if_changed; - VariantContainer() : - order(0), - has_default_value(false), - hide_from_editor(false), - save(false), - restart_if_changed(false) { - } + bool has_default_value = false; + bool hide_from_editor = false; + bool save = false; + bool restart_if_changed = false; + + VariantContainer() {} + VariantContainer(const Variant &p_variant, int p_order) : order(p_order), - variant(p_variant), - has_default_value(false), - hide_from_editor(false), - save(false), - restart_if_changed(false) { + variant(p_variant) { } }; @@ -148,10 +138,11 @@ public: void set_initial_value(const StringName &p_setting, const Variant &p_value, bool p_update_current = false); void set_restart_if_changed(const StringName &p_setting, bool p_restart); void set_manually(const StringName &p_setting, const Variant &p_value, bool p_emit_signal = false) { - if (p_emit_signal) + if (p_emit_signal) { _set(p_setting, p_value); - else + } else { _set_only(p_setting, p_value); + } } bool property_can_revert(const String &p_setting); Variant property_get_revert(const String &p_setting); |