ryujinx/Ryujinx/Ui/Applet/ErrorAppletDialog.cs

30 lines
850 B
C#
Raw Normal View History

2020-09-27 15:00:38 -07:00
using Gtk;
2021-01-18 12:33:58 -08:00
using System.Reflection;
2020-09-27 15:00:38 -07:00
namespace Ryujinx.Ui.Applet
2020-09-27 15:00:38 -07: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 12:33:58 -08:00
Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.Resources.Logo_Ryujinx.png");
2020-09-27 15:00:38 -07:00
int responseId = 0;
if (buttons != null)
{
foreach (string buttonText in buttons)
{
AddButton(buttonText, responseId);
responseId++;
}
}
else
{
AddButton("OK", 0);
}
ShowAll();
}
}
}