diff options
Diffstat (limited to 'src/Ryujinx.Gtk3/UI/Applet/ErrorAppletDialog.cs')
-rw-r--r-- | src/Ryujinx.Gtk3/UI/Applet/ErrorAppletDialog.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Ryujinx.Gtk3/UI/Applet/ErrorAppletDialog.cs b/src/Ryujinx.Gtk3/UI/Applet/ErrorAppletDialog.cs new file mode 100644 index 00000000..cb8103ca --- /dev/null +++ b/src/Ryujinx.Gtk3/UI/Applet/ErrorAppletDialog.cs @@ -0,0 +1,31 @@ +using Gtk; +using Ryujinx.UI.Common.Configuration; +using System.Reflection; + +namespace Ryujinx.UI.Applet +{ + internal class ErrorAppletDialog : MessageDialog + { + public ErrorAppletDialog(Window parentWindow, DialogFlags dialogFlags, MessageType messageType, string[] buttons) : base(parentWindow, dialogFlags, messageType, ButtonsType.None, null) + { + Icon = new Gdk.Pixbuf(Assembly.GetAssembly(typeof(ConfigurationState)), "Ryujinx.Gtk3.UI.Common.Resources.Logo_Ryujinx.png"); + + int responseId = 0; + + if (buttons != null) + { + foreach (string buttonText in buttons) + { + AddButton(buttonText, responseId); + responseId++; + } + } + else + { + AddButton("OK", 0); + } + + ShowAll(); + } + } +} |