feat: don't close settings window when saving, if shift is held

This commit is contained in:
goaaats 2023-01-08 00:14:26 +01:00
parent 31a4f895a0
commit c7215c25a5
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B

View file

@ -170,14 +170,19 @@ internal class SettingsWindow : Window
{
this.Save();
this.IsOpen = false;
if (!ImGui.IsKeyDown(ImGuiKey.ModShift))
this.IsOpen = false;
}
ImGui.PopStyleVar();
ImGui.PopFont();
if (ImGui.IsItemHovered())
ImGui.SetTooltip(Loc.Localize("DalamudSettingsSaveAndExit", "Save changes and close"));
{
ImGui.SetTooltip(!ImGui.IsKeyDown(ImGuiKey.ModShift)
? Loc.Localize("DalamudSettingsSaveAndExit", "Save changes and close")
: Loc.Localize("DalamudSettingsSaveAndExit", "Save changes"));
}
if (invalid)
ImGui.EndDisabled();