GuideDialog.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using Gtk;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Reflection;
  5. using System.Text;
  6. namespace Ryujinx.Ui.Diagnostic
  7. {
  8. internal class GuideDialog : MessageDialog
  9. {
  10. internal static bool _isExitDialogOpen = false;
  11. public GuideDialog(string title, string mainText, string secondaryText) : base(null, DialogFlags.Modal, MessageType.Other, ButtonsType.None, null)
  12. {
  13. Title = title;
  14. Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.Icon.png");
  15. Text = mainText;
  16. SecondaryText = secondaryText;
  17. WindowPosition = WindowPosition.Center;
  18. Response += GtkDialog_Response;
  19. Button guideButton = new Button();
  20. guideButton.Label = "Open the Setup Guide";
  21. ContentArea.Add(guideButton);
  22. SetSizeRequest(100, 10);
  23. ShowAll();
  24. }
  25. private void GtkDialog_Response(object sender, ResponseArgs args)
  26. {
  27. Dispose();
  28. }
  29. }
  30. }