ryujinx/Ryujinx/Ui/Applet/ErrorAppletDialog.cs

30 lines
850 B
C#
Raw Normal View History

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