Basic impl of Error Applet (#1551)

This commit is contained in:
Ac_K 2020-09-28 00:00:38 +02:00 committed by GitHub
parent f89b754abb
commit 4f65043ad7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 303 additions and 0 deletions

View file

@ -0,0 +1,32 @@
using Gtk;
using System.Reflection;
namespace Ryujinx.Ui
{
internal class ErrorAppletDialog : MessageDialog
{
internal static bool _isExitDialogOpen = false;
public ErrorAppletDialog(Window parentWindow, DialogFlags dialogFlags, MessageType messageType, string[] buttons) : base(parentWindow, dialogFlags, messageType, ButtonsType.None, null)
{
Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.Icon.png");
int responseId = 0;
if (buttons != null)
{
foreach (string buttonText in buttons)
{
AddButton(buttonText, responseId);
responseId++;
}
}
else
{
AddButton("OK", 0);
}
ShowAll();
}
}
}