/ src / Ryujinx.Gtk3 / UI / Applet / ErrorAppletDialog.cs
ErrorAppletDialog.cs
 1  using Gtk;
 2  using Ryujinx.UI.Common.Configuration;
 3  using System.Reflection;
 4  
 5  namespace Ryujinx.UI.Applet
 6  {
 7      internal class ErrorAppletDialog : MessageDialog
 8      {
 9          public ErrorAppletDialog(Window parentWindow, DialogFlags dialogFlags, MessageType messageType, string[] buttons) : base(parentWindow, dialogFlags, messageType, ButtonsType.None, null)
10          {
11              Icon = new Gdk.Pixbuf(Assembly.GetAssembly(typeof(ConfigurationState)), "Ryujinx.Gtk3.UI.Common.Resources.Logo_Ryujinx.png");
12  
13              int responseId = 0;
14  
15              if (buttons != null)
16              {
17                  foreach (string buttonText in buttons)
18                  {
19                      AddButton(buttonText, responseId);
20                      responseId++;
21                  }
22              }
23              else
24              {
25                  AddButton("OK", 0);
26              }
27  
28              ShowAll();
29          }
30      }
31  }