You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
Simplify editor settings related to window dimming
Only a single checkbox is now exposed to control whether the editor window should be dimmed when opening a popup. The main use case for disabling it is picking colors from the editor window while a popup is open.
This commit is contained in:
@@ -2615,7 +2615,7 @@ void EditorNode::_exit_editor() {
|
|||||||
|
|
||||||
// Dim the editor window while it's quitting to make it clearer that it's busy.
|
// Dim the editor window while it's quitting to make it clearer that it's busy.
|
||||||
// No transition is applied, as the effect needs to be visible immediately
|
// No transition is applied, as the effect needs to be visible immediately
|
||||||
float c = 1.0f - float(EDITOR_GET("interface/editor/dim_amount"));
|
float c = 0.4f;
|
||||||
Color dim_color = Color(c, c, c);
|
Color dim_color = Color(c, c, c);
|
||||||
gui_base->set_modulate(dim_color);
|
gui_base->set_modulate(dim_color);
|
||||||
|
|
||||||
@@ -5051,9 +5051,8 @@ void EditorNode::_start_dimming(bool p_dimming) {
|
|||||||
void EditorNode::_dim_timeout() {
|
void EditorNode::_dim_timeout() {
|
||||||
|
|
||||||
_dim_time += _dim_timer->get_wait_time();
|
_dim_time += _dim_timer->get_wait_time();
|
||||||
float wait_time = EditorSettings::get_singleton()->get("interface/editor/dim_transition_time");
|
float wait_time = 0.08f;
|
||||||
|
float c = 0.4f;
|
||||||
float c = 1.0f - (float)EditorSettings::get_singleton()->get("interface/editor/dim_amount");
|
|
||||||
|
|
||||||
Color base = _dimming ? Color(1, 1, 1) : Color(c, c, c);
|
Color base = _dimming ? Color(1, 1, 1) : Color(c, c, c);
|
||||||
Color final = _dimming ? Color(c, c, c) : Color(1, 1, 1);
|
Color final = _dimming ? Color(c, c, c) : Color(1, 1, 1);
|
||||||
|
|||||||
@@ -336,10 +336,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||||||
_initial_set("interface/editor/code_font", "");
|
_initial_set("interface/editor/code_font", "");
|
||||||
hints["interface/editor/code_font"] = PropertyInfo(Variant::STRING, "interface/editor/code_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT);
|
hints["interface/editor/code_font"] = PropertyInfo(Variant::STRING, "interface/editor/code_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT);
|
||||||
_initial_set("interface/editor/dim_editor_on_dialog_popup", true);
|
_initial_set("interface/editor/dim_editor_on_dialog_popup", true);
|
||||||
_initial_set("interface/editor/dim_amount", 0.6f);
|
|
||||||
hints["interface/editor/dim_amount"] = PropertyInfo(Variant::REAL, "interface/editor/dim_amount", PROPERTY_HINT_RANGE, "0,1,0.01", PROPERTY_USAGE_DEFAULT);
|
|
||||||
_initial_set("interface/editor/dim_transition_time", 0.08f);
|
|
||||||
hints["interface/editor/dim_transition_time"] = PropertyInfo(Variant::REAL, "interface/editor/dim_transition_time", PROPERTY_HINT_RANGE, "0,1,0.001", PROPERTY_USAGE_DEFAULT);
|
|
||||||
_initial_set("interface/editor/low_processor_mode_sleep_usec", 6900); // ~144 FPS
|
_initial_set("interface/editor/low_processor_mode_sleep_usec", 6900); // ~144 FPS
|
||||||
hints["interface/editor/low_processor_mode_sleep_usec"] = PropertyInfo(Variant::REAL, "interface/editor/low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT);
|
hints["interface/editor/low_processor_mode_sleep_usec"] = PropertyInfo(Variant::REAL, "interface/editor/low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "1,100000,1", PROPERTY_USAGE_DEFAULT);
|
||||||
_initial_set("interface/editor/unfocused_low_processor_mode_sleep_usec", 50000); // 20 FPS
|
_initial_set("interface/editor/unfocused_low_processor_mode_sleep_usec", 50000); // 20 FPS
|
||||||
|
|||||||
@@ -1730,7 +1730,7 @@ void ProjectManager::_dim_window() {
|
|||||||
|
|
||||||
// Dim the project manager window while it's quitting to make it clearer that it's busy.
|
// Dim the project manager window while it's quitting to make it clearer that it's busy.
|
||||||
// No transition is applied, as the effect needs to be visible immediately
|
// No transition is applied, as the effect needs to be visible immediately
|
||||||
float c = 1.0f - float(EDITOR_GET("interface/editor/dim_amount"));
|
float c = 0.4f;
|
||||||
Color dim_color = Color(c, c, c);
|
Color dim_color = Color(c, c, c);
|
||||||
gui_base->set_modulate(dim_color);
|
gui_base->set_modulate(dim_color);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user