ErrorAppletDialog.cs 715 B

123456789101112131415161718192021222324252627
  1. using Gtk;
  2. namespace Ryujinx.Ui.Applet
  3. {
  4. internal class ErrorAppletDialog : MessageDialog
  5. {
  6. public ErrorAppletDialog(Window parentWindow, DialogFlags dialogFlags, MessageType messageType, string[] buttons) : base(parentWindow, dialogFlags, messageType, ButtonsType.None, null)
  7. {
  8. int responseId = 0;
  9. if (buttons != null)
  10. {
  11. foreach (string buttonText in buttons)
  12. {
  13. AddButton(buttonText, responseId);
  14. responseId++;
  15. }
  16. }
  17. else
  18. {
  19. AddButton("OK", 0);
  20. }
  21. ShowAll();
  22. }
  23. }
  24. }