diff options
author | kobewi <kobewi4e@gmail.com> | 2024-09-02 14:04:02 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2024-09-17 12:20:55 +0200 |
commit | 4023ace08d4c5d91fa9d1096a0a0b98885a475e1 (patch) | |
tree | ca6e52ab9597e0ba908fc7471f501252aff870a4 /editor/editor_settings.h | |
parent | 02b16d2f544e323b7b7f57e6e992b0b8e5d8b954 (diff) | |
download | redot-engine-4023ace08d4c5d91fa9d1096a0a0b98885a475e1.tar.gz |
Add Advanced Settings switch to Editor Settings
Diffstat (limited to 'editor/editor_settings.h')
-rw-r--r-- | editor/editor_settings.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/editor/editor_settings.h b/editor/editor_settings.h index 6338f9105c..e850406839 100644 --- a/editor/editor_settings.h +++ b/editor/editor_settings.h @@ -67,6 +67,7 @@ private: int order = 0; Variant variant; Variant initial; + bool basic = false; bool has_default_value = false; bool hide_from_editor = false; bool save = false; @@ -103,7 +104,7 @@ private: bool _set(const StringName &p_name, const Variant &p_value); bool _set_only(const StringName &p_name, const Variant &p_value); bool _get(const StringName &p_name, Variant &r_ret) const; - void _initial_set(const StringName &p_name, const Variant &p_value); + void _initial_set(const StringName &p_name, const Variant &p_value, bool p_basic = false); void _get_property_list(List<PropertyInfo> *p_list) const; void _add_property_info_bind(const Dictionary &p_info); bool _property_can_revert(const StringName &p_name) const; @@ -147,6 +148,7 @@ public: void raise_order(const String &p_setting); 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_basic(const StringName &p_setting, bool p_basic); void set_manually(const StringName &p_setting, const Variant &p_value, bool p_emit_signal = false) { if (p_emit_signal) { _set(p_setting, p_value); @@ -204,7 +206,8 @@ public: #define EDITOR_DEF(m_var, m_val) _EDITOR_DEF(m_var, Variant(m_val)) #define EDITOR_DEF_RST(m_var, m_val) _EDITOR_DEF(m_var, Variant(m_val), true) -Variant _EDITOR_DEF(const String &p_setting, const Variant &p_default, bool p_restart_if_changed = false); +#define EDITOR_DEF_BASIC(m_var, m_val) _EDITOR_DEF(m_var, Variant(m_val), false, true) +Variant _EDITOR_DEF(const String &p_setting, const Variant &p_default, bool p_restart_if_changed = false, bool p_basic = false); #define EDITOR_GET(m_var) _EDITOR_GET(m_var) Variant _EDITOR_GET(const String &p_setting); |