summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Sizov <11782833+YuriSizov@users.noreply.github.com>2023-05-31 13:05:06 +0200
committerGitHub <noreply@github.com>2023-05-31 13:05:06 +0200
commitaefc468fe162693a88a076901cfb90258232ba37 (patch)
tree7a722436788a9f0fc849e0a26067c7f4ea54d919
parent5598fec7c0a820b79a8518c49e12f93eca804958 (diff)
parent50d8ee8eee619e8c406b85bb69766e9adac3ef78 (diff)
downloadredot-engine-aefc468fe162693a88a076901cfb90258232ba37.tar.gz
Merge pull request #77668 from winston-yallow/expose-marking-project-settings-internal
Expose method to set a project setting as internal
-rw-r--r--core/config/project_settings.cpp1
-rw-r--r--doc/classes/ProjectSettings.xml8
2 files changed, 9 insertions, 0 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp
index 2b18319a25..c374fdb84f 100644
--- a/core/config/project_settings.cpp
+++ b/core/config/project_settings.cpp
@@ -1207,6 +1207,7 @@ void ProjectSettings::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_order", "name"), &ProjectSettings::get_order);
ClassDB::bind_method(D_METHOD("set_initial_value", "name", "value"), &ProjectSettings::set_initial_value);
ClassDB::bind_method(D_METHOD("set_as_basic", "name", "basic"), &ProjectSettings::set_as_basic);
+ ClassDB::bind_method(D_METHOD("set_as_internal", "name", "internal"), &ProjectSettings::set_as_internal);
ClassDB::bind_method(D_METHOD("add_property_info", "hint"), &ProjectSettings::_add_property_info_bind);
ClassDB::bind_method(D_METHOD("set_restart_if_changed", "name", "restart"), &ProjectSettings::set_restart_if_changed);
ClassDB::bind_method(D_METHOD("clear", "name"), &ProjectSettings::clear);
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 55cef92f16..311b37b1b1 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -185,6 +185,14 @@
Defines if the specified setting is considered basic or advanced. Basic settings will always be shown in the project settings. Advanced settings will only be shown if the user enables the "Advanced Settings" option.
</description>
</method>
+ <method name="set_as_internal">
+ <return type="void" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="internal" type="bool" />
+ <description>
+ Defines if the specified setting is considered internal. An internal setting won't show up in the Project Settings dialog. This is mostly useful for addons that need to store their own internal settings without exposing them directly to the user.
+ </description>
+ </method>
<method name="set_initial_value">
<return type="void" />
<param index="0" name="name" type="String" />