add option to disable editor UI animations (#1011)
* add option to disable editor UI animations * focus mode updates --------- Co-authored-by: Turánszki János <turanszkij@users.noreply.github.com>
This commit is contained in:
@@ -154,7 +154,20 @@ void GeneralWindow::Create(EditorComponent* _editor)
|
||||
forceDiffuseLightingCheckBox.SetCheck(wi::renderer::IsForceDiffuseLighting());
|
||||
AddWidget(&forceDiffuseLightingCheckBox);
|
||||
|
||||
|
||||
focusModeCheckBox.Create(ICON_EYE " Focus mode GUI: ");
|
||||
focusModeCheckBox.SetCheckText(ICON_EYE);
|
||||
focusModeCheckBox.SetTooltip("Reduce the amount of effects in the editor GUI to improve accessibility");
|
||||
if (editor->main->config.GetSection("options").Has("focus_mode"))
|
||||
{
|
||||
focusModeCheckBox.SetCheck(editor->main->config.GetSection("options").GetBool("focus_mode"));
|
||||
}
|
||||
focusModeCheckBox.OnClick([&](wi::gui::EventArgs args) {
|
||||
editor->main->config.GetSection("options").Set("focus_mode", args.bValue);
|
||||
// trigger themeCombo's OnSelect handler, which will enable/disable shadow highlighting
|
||||
// according to this checkbox's state
|
||||
themeCombo.SetSelected(themeCombo.GetSelected());
|
||||
});
|
||||
AddWidget(&focusModeCheckBox);
|
||||
|
||||
versionCheckBox.Create("Version: ");
|
||||
versionCheckBox.SetTooltip("Toggle the engine version display text in top left corner.");
|
||||
@@ -385,7 +398,7 @@ void GeneralWindow::Create(EditorComponent* _editor)
|
||||
break;
|
||||
}
|
||||
|
||||
theme.shadow_highlight = true;
|
||||
theme.shadow_highlight = !focusModeCheckBox.GetCheck();
|
||||
theme.shadow_highlight_spread = 0.6f;
|
||||
theme.shadow_highlight_color = theme_color_focus;
|
||||
theme.shadow_highlight_color.x *= 1.4f;
|
||||
@@ -777,6 +790,16 @@ void GeneralWindow::Create(EditorComponent* _editor)
|
||||
sprite.params.corners_rounding[3].radius = 10;
|
||||
}
|
||||
|
||||
if (focusModeCheckBox.GetCheck())
|
||||
{
|
||||
editor->newEntityCombo.SetAngularHighlightWidth(0);
|
||||
editor->newEntityCombo.SetShadowRadius(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
editor->newEntityCombo.SetAngularHighlightWidth(3);
|
||||
editor->newEntityCombo.SetShadowRadius(0);
|
||||
}
|
||||
});
|
||||
AddWidget(&themeCombo);
|
||||
|
||||
@@ -993,6 +1016,9 @@ void GeneralWindow::ResizeLayout()
|
||||
add_right(freezeCullingCameraCheckBox);
|
||||
add_right(disableAlbedoMapsCheckBox);
|
||||
add_right(forceDiffuseLightingCheckBox);
|
||||
y += jump;
|
||||
|
||||
add_right(focusModeCheckBox);
|
||||
|
||||
y += jump;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user