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,6 +170,7 @@ internal class SettingsWindow : Window
{ {
this.Save(); this.Save();
if (!ImGui.IsKeyDown(ImGuiKey.ModShift))
this.IsOpen = false; this.IsOpen = false;
} }
@ -177,7 +178,11 @@ internal class SettingsWindow : Window
ImGui.PopFont(); ImGui.PopFont();
if (ImGui.IsItemHovered()) 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) if (invalid)
ImGui.EndDisabled(); ImGui.EndDisabled();