2020-09-28 00:00:38 +02:00
|
|
|
|
using Gtk;
|
2021-01-18 21:33:58 +01:00
|
|
|
|
using System.Reflection;
|
2020-09-28 00:00:38 +02:00
|
|
|
|
|
2021-01-08 09:14:13 +01:00
|
|
|
|
namespace Ryujinx.Ui.Applet
|
2020-09-28 00:00:38 +02:00
|
|
|
|
{
|
|
|
|
|
internal class ErrorAppletDialog : MessageDialog
|
|
|
|
|
{
|
|
|
|
|
public ErrorAppletDialog(Window parentWindow, DialogFlags dialogFlags, MessageType messageType, string[] buttons) : base(parentWindow, dialogFlags, messageType, ButtonsType.None, null)
|
|
|
|
|
{
|
2021-01-18 21:33:58 +01:00
|
|
|
|
Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.Resources.Logo_Ryujinx.png");
|
|
|
|
|
|
2020-09-28 00:00:38 +02:00
|
|
|
|
int responseId = 0;
|
|
|
|
|
|
|
|
|
|
if (buttons != null)
|
|
|
|
|
{
|
|
|
|
|
foreach (string buttonText in buttons)
|
|
|
|
|
{
|
|
|
|
|
AddButton(buttonText, responseId);
|
|
|
|
|
responseId++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
AddButton("OK", 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ShowAll();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|