Skip to content

Commit

Permalink
Polished DialogBox Titles
Browse files Browse the repository at this point in the history
  • Loading branch information
HerpDerpinstine committed Nov 22, 2024
1 parent 919fb64 commit f500bf5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MelonLoader.Installer/Views/DetailsView.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private void OnOperationFinished(string? errorMessage, bool addedLocalBuild = fa
};
}

DialogBox.ShowNotice("Success!", $"Successfully {operationType}{((!Model.Game.MLInstalled || isReinstall) ? string.Empty : " to")}\nMelonLoader{(Model.Game.MLInstalled ? $" v{Model.Game.MLVersion}" : string.Empty)}");
DialogBox.ShowNotice("SUCCESS!", $"Successfully {operationType}{((!Model.Game.MLInstalled || isReinstall) ? string.Empty : " to")}\nMelonLoader{(Model.Game.MLInstalled ? $" v{Model.Game.MLVersion}" : string.Empty)}");
}

private void OpenDirHandler(object sender, RoutedEventArgs args)
Expand Down
7 changes: 5 additions & 2 deletions MelonLoader.Installer/Views/DialogBox.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ protected override void OnClosed(EventArgs e)
}

public static void ShowError(string message, Action? onClose = null)
=> ShowError("ERROR!", message, onClose);

public static void ShowError(string title, string message, Action? onClose = null)
{
new DialogBox
{
Title = "Error",
Title = title,
DataContext = new DialogBoxModel
{
Message = message,
Expand All @@ -34,7 +37,7 @@ public static void ShowError(string message, Action? onClose = null)
}

public static void ShowNotice(string message)
=> ShowNotice("Notice", message);
=> ShowNotice("NOTICE", message);

public static void ShowNotice(string title, string message)
{
Expand Down

0 comments on commit f500bf5

Please sign in to comment.