diff options
| author | Andreas Haas <liu.gam3@gmail.com> | 2017-03-06 20:11:56 +0100 |
|---|---|---|
| committer | Andreas Haas <liu.gam3@gmail.com> | 2017-03-06 20:14:41 +0100 |
| commit | 9080232f1768e6a7a7ab1b5e9c65f59aa19b2cc0 (patch) | |
| tree | 6cdd766bd1f70283b95c5bbcf9e0d291c14854b3 /editor/editor_settings.cpp | |
| parent | 15c4d5006ee6982223777ababfbc2c040f3e344f (diff) | |
| download | redot-engine-9080232f1768e6a7a7ab1b5e9c65f59aa19b2cc0.tar.gz | |
Editor: Dim UI when a WindowDialog is shown.
Darkens the editor on WindowDialog popup.
This adds the following new Editor settings:
- interface/dim_editor_on_dialog_popup (true) # Enable/Disable editor dimming
- interface/dim_amount (0.6) # Percentage of how much the editor will be darkened (0-1)
- interface/dim_transition_time # The duration (in seconds) of the color blending effect (0-1), 0 is instant.
Please test this thoroughly, I haven't yet seen a case where it fails to work properly but I'm sure I didn't test all
windows of the editor :P
Diffstat (limited to 'editor/editor_settings.cpp')
| -rw-r--r-- | editor/editor_settings.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 8794a34f62..9e5021af6e 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -502,6 +502,11 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { hints["interface/custom_font"] = PropertyInfo(Variant::STRING, "interface/custom_font", PROPERTY_HINT_GLOBAL_FILE, "*.fnt", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); set("interface/custom_theme", ""); hints["interface/custom_theme"] = PropertyInfo(Variant::STRING, "interface/custom_theme", PROPERTY_HINT_GLOBAL_FILE, "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); + set("interface/dim_editor_on_dialog_popup", true); + set("interface/dim_amount", 0.6f); + hints["interface/dim_amount"] = PropertyInfo(Variant::REAL, "interface/dim_amount", PROPERTY_HINT_RANGE, "0,1,0.01", PROPERTY_USAGE_DEFAULT); + set("interface/dim_transition_time", 0.11f); + hints["interface/dim_transition_time"] = PropertyInfo(Variant::REAL, "interface/dim_transition_time", PROPERTY_HINT_RANGE, "0,1,0.001", PROPERTY_USAGE_DEFAULT); set("filesystem/directories/autoscan_project_path", ""); hints["filesystem/directories/autoscan_project_path"] = PropertyInfo(Variant::STRING, "filesystem/directories/autoscan_project_path", PROPERTY_HINT_GLOBAL_DIR); |
