Merge pull request #53839 from EricEzaM/editor-settings-changed-settings

Added ability to get list of editor settings changed when saving editor settings. Optimised settings changed notification.
This commit is contained in:
Rémi Verschelde 2022-03-05 12:54:38 +01:00 committed by GitHub
commit cdd63fa872
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 85 additions and 14 deletions

View file

@ -70,6 +70,13 @@
[/codeblocks]
</description>
</method>
<method name="check_changed_settings_in_group" qualifiers="const">
<return type="bool" />
<argument index="0" name="setting_prefix" type="String" />
<description>
Checks if any settings with the prefix [code]setting_prefix[/code] exist in the set of changed settings. See also [method get_changed_settings].
</description>
</method>
<method name="erase">
<return type="void" />
<argument index="0" name="property" type="String" />
@ -77,6 +84,12 @@
Erases the setting whose name is specified by [code]property[/code].
</description>
</method>
<method name="get_changed_settings" qualifiers="const">
<return type="Array" />
<description>
Gets an array of the settings which have been changed since the last save. Note that internally [code]changed_settings[/code] is cleared after a successful save, so generally the most appropriate place to use this method is when processing [constant NOTIFICATION_EDITOR_SETTINGS_CHANGED]
</description>
</method>
<method name="get_favorites" qualifiers="const">
<return type="PackedStringArray" />
<description>
@ -118,6 +131,13 @@
Returns [code]true[/code] if the setting specified by [code]name[/code] exists, [code]false[/code] otherwise.
</description>
</method>
<method name="mark_setting_changed">
<return type="void" />
<argument index="0" name="setting" type="String" />
<description>
Marks the passed editor setting as being changed, see [method get_changed_settings]. Only settings which exist (see [method has_setting]) will be accepted.
</description>
</method>
<method name="property_can_revert">
<return type="bool" />
<argument index="0" name="name" type="String" />