account: add Custom User Profiles support (#2227)
* Initial Impl * Fix names * remove useless ContentManager * Support backgrounds and improve avatar loading * Fix firmware checks * Addresses gdkchan feedback
This commit is contained in:
parent
3e61fb0268
commit
c46f6879ff
14 changed files with 1286 additions and 41 deletions
|
@ -1,6 +1,7 @@
|
|||
using Gtk;
|
||||
using System.Reflection;
|
||||
using Ryujinx.Common.Logging;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Ui.Widgets
|
||||
{
|
||||
|
@ -76,6 +77,34 @@ namespace Ryujinx.Ui.Widgets
|
|||
return response == ResponseType.Yes;
|
||||
}
|
||||
|
||||
internal static ResponseType CreateCustomDialog(string title, string mainText, string secondaryText, Dictionary<int, string> buttons, MessageType messageType = MessageType.Other)
|
||||
{
|
||||
GtkDialog gtkDialog = new GtkDialog(title, mainText, secondaryText, messageType, ButtonsType.None);
|
||||
|
||||
foreach (var button in buttons)
|
||||
{
|
||||
gtkDialog.AddButton(button.Value, button.Key);
|
||||
}
|
||||
|
||||
return (ResponseType)gtkDialog.Run();
|
||||
}
|
||||
|
||||
internal static string CreateInputDialog(Window parent, string title, string mainText, uint inputMax)
|
||||
{
|
||||
GtkInputDialog gtkDialog = new GtkInputDialog(parent, title, mainText, inputMax);
|
||||
ResponseType response = (ResponseType)gtkDialog.Run();
|
||||
string responseText = gtkDialog.InputEntry.Text.TrimEnd();
|
||||
|
||||
gtkDialog.Dispose();
|
||||
|
||||
if (response == ResponseType.Ok)
|
||||
{
|
||||
return responseText;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
internal static bool CreateExitDialog()
|
||||
{
|
||||
return CreateChoiceDialog("Ryujinx - Exit", "Are you sure you want to close Ryujinx?", "All unsaved data will be lost!");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue