Skip to content

Commit

Permalink
Merge pull request #15 from rankynbass/fix-invalid-settings-button
Browse files Browse the repository at this point in the history
  • Loading branch information
goaaats authored Jan 14, 2023
2 parents 386c6c8 + 1e243fc commit f6a8da1
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/XIVLauncher.Core/Components/SettingsPage/SettingsPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,25 @@ public override void Draw()

var invalid = this.tabs.Any(x => x.Entries.Any(y => !y.IsValid));
if (invalid)
{
ImGui.BeginDisabled();

if (ImGui.Button(FontAwesomeIcon.Check.ToIconString(), new Vector2(40)))
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
ImGui.Button(FontAwesomeIcon.Ban.ToIconString(), new Vector2(40));
ImGui.PopStyleColor();
ImGui.EndDisabled();
}
else
{
foreach (var settingsTab in this.tabs)
if (ImGui.Button(FontAwesomeIcon.Check.ToIconString(), new Vector2(40)))
{
settingsTab.Save();
}
foreach (var settingsTab in this.tabs)
{
settingsTab.Save();
}

this.App.State = LauncherApp.LauncherState.Main;
this.App.State = LauncherApp.LauncherState.Main;
}
}

if (invalid)
ImGui.EndDisabled();
}

ImGui.EndChild();
Expand Down

0 comments on commit f6a8da1

Please sign in to comment.