From f500bf51a265667a67bca271a82ec0518f2d54d3 Mon Sep 17 00:00:00 2001 From: Herp Derpinstine Date: Fri, 22 Nov 2024 00:12:59 -0600 Subject: [PATCH] Polished DialogBox Titles --- MelonLoader.Installer/Views/DetailsView.axaml.cs | 2 +- MelonLoader.Installer/Views/DialogBox.axaml.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/MelonLoader.Installer/Views/DetailsView.axaml.cs b/MelonLoader.Installer/Views/DetailsView.axaml.cs index 7c42fa0..523e2a6 100644 --- a/MelonLoader.Installer/Views/DetailsView.axaml.cs +++ b/MelonLoader.Installer/Views/DetailsView.axaml.cs @@ -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) diff --git a/MelonLoader.Installer/Views/DialogBox.axaml.cs b/MelonLoader.Installer/Views/DialogBox.axaml.cs index 38be899..a843710 100644 --- a/MelonLoader.Installer/Views/DialogBox.axaml.cs +++ b/MelonLoader.Installer/Views/DialogBox.axaml.cs @@ -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, @@ -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) {