From 88dab526e91e16bd209ad9f1e5f325a4c94de4f2 Mon Sep 17 00:00:00 2001 From: Butterscotch! Date: Tue, 6 Aug 2024 10:07:35 -0400 Subject: [PATCH] Move error to separate window --- SlimeVrOta.Gui/ErrorDialog.axaml | 62 +++++++++++++++++++++++++++++ SlimeVrOta.Gui/ErrorDialog.axaml.cs | 16 ++++++++ SlimeVrOta.Gui/MainWindow.axaml | 43 -------------------- SlimeVrOta.Gui/MainWindow.axaml.cs | 12 +++--- 4 files changed, 83 insertions(+), 50 deletions(-) create mode 100644 SlimeVrOta.Gui/ErrorDialog.axaml create mode 100644 SlimeVrOta.Gui/ErrorDialog.axaml.cs diff --git a/SlimeVrOta.Gui/ErrorDialog.axaml b/SlimeVrOta.Gui/ErrorDialog.axaml new file mode 100644 index 0000000..3f8fd12 --- /dev/null +++ b/SlimeVrOta.Gui/ErrorDialog.axaml @@ -0,0 +1,62 @@ + + + + + + + WhiteSmoke + #e2d8eb + 1 1 8 2 #c5c5c5 + #d080ff + + + #252525 + #383442 + 1 1 8 2 #161616 + #a070d0 + + + + + + + + + + Unknown error. + + + + + + diff --git a/SlimeVrOta.Gui/ErrorDialog.axaml.cs b/SlimeVrOta.Gui/ErrorDialog.axaml.cs new file mode 100644 index 0000000..807d312 --- /dev/null +++ b/SlimeVrOta.Gui/ErrorDialog.axaml.cs @@ -0,0 +1,16 @@ +using Avalonia.Controls; + +namespace SlimeVrOta.Gui; + +public partial class ErrorDialog : Window +{ + public ErrorDialog() + { + InitializeComponent(); + + CloseErrorButton.Click += (_, _) => + { + Close(); + }; + } +} diff --git a/SlimeVrOta.Gui/MainWindow.axaml b/SlimeVrOta.Gui/MainWindow.axaml index 07a7dc1..555cbc3 100644 --- a/SlimeVrOta.Gui/MainWindow.axaml +++ b/SlimeVrOta.Gui/MainWindow.axaml @@ -16,14 +16,12 @@ WhiteSmoke #e2d8eb - #706080 1 1 8 2 #c5c5c5 #d080ff #252525 #383442 - #908892 1 1 8 2 #161616 #a070d0 @@ -32,47 +30,6 @@ - - - - - - - Unknown error. - - - - - - - -