-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce Log.gd editor-settings
Hooks into the editor_settings.settings_changed signal - towards supporting setting custom values for Log.gd config options, such as disable_colors and max_array_size. Not _quite_ working, but this is the bulk of the work.
- Loading branch information
1 parent
a1cc3e2
commit 4b137b7
Showing
3 changed files
with
58 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
@tool | ||
extends EditorPlugin | ||
|
||
var editor_settings | ||
|
||
func _enter_tree(): | ||
editor_settings = get_editor_interface().get_editor_settings() | ||
editor_settings.settings_changed.connect(on_settings_changed) | ||
|
||
Log.setup_config(editor_settings) | ||
|
||
func on_settings_changed(): | ||
if editor_settings.check_changed_settings_in_group(Log.KEY_PREFIX): | ||
var changed_keys = editor_settings.get_changed_settings() | ||
Log.setup_config(editor_settings, {updated_keys=changed_keys}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters