Skip to content

Commit

Permalink
Add ProjectSettings::set_hide_from_editor()
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomShaper committed Nov 9, 2021
1 parent abdf931 commit b6f04df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions core/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

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) {
ERR_FAIL_COND_MSG(!props.has(p_name), "Request for nonexistent project setting: " + p_name + ".");
#ifdef DEBUG_METHODS_ENABLED
Expand Down
2 changes: 1 addition & 1 deletion core/project_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ class ProjectSettings : public Object {

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_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);
bool get_ignore_value_in_docs(const String &p_name) const;

bool property_can_revert(const String &p_name);
Variant property_get_revert(const String &p_name);

Expand Down

0 comments on commit b6f04df

Please sign in to comment.