Add ProjectSettings::set_hide_from_editor()

This commit is contained in:
Pedro J. Estébanez 2021-10-05 22:10:12 +02:00
parent abdf931832
commit b6f04dfd21
2 changed files with 6 additions and 1 deletions

View file

@ -127,6 +127,11 @@ void ProjectSettings::set_restart_if_changed(const String &p_name, bool p_restar
props[p_name].restart_if_changed = p_restart; props[p_name].restart_if_changed = p_restart;
} }
void ProjectSettings::set_hide_from_editor(const String &p_name, bool p_hide_from_editor) {
ERR_FAIL_COND_MSG(!props.has(p_name), "Request for nonexistent project setting: " + p_name + ".");
props[p_name].hide_from_editor = p_hide_from_editor;
}
void ProjectSettings::set_ignore_value_in_docs(const String &p_name, bool p_ignore) { void ProjectSettings::set_ignore_value_in_docs(const String &p_name, bool p_ignore) {
ERR_FAIL_COND_MSG(!props.has(p_name), "Request for nonexistent project setting: " + p_name + "."); ERR_FAIL_COND_MSG(!props.has(p_name), "Request for nonexistent project setting: " + p_name + ".");
#ifdef DEBUG_METHODS_ENABLED #ifdef DEBUG_METHODS_ENABLED

View file

@ -131,9 +131,9 @@ public:
void set_initial_value(const String &p_name, const Variant &p_value); void set_initial_value(const String &p_name, const Variant &p_value);
void set_restart_if_changed(const String &p_name, bool p_restart); void set_restart_if_changed(const String &p_name, bool p_restart);
void set_hide_from_editor(const String &p_name, bool p_hide_from_editor);
void set_ignore_value_in_docs(const String &p_name, bool p_ignore); void set_ignore_value_in_docs(const String &p_name, bool p_ignore);
bool get_ignore_value_in_docs(const String &p_name) const; bool get_ignore_value_in_docs(const String &p_name) const;
bool property_can_revert(const String &p_name); bool property_can_revert(const String &p_name);
Variant property_get_revert(const String &p_name); Variant property_get_revert(const String &p_name);