mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-10 12:49:13 +00:00
r/therestofthefuckingowl
This commit is contained in:
parent
c567f40531
commit
920777bc4b
2 changed files with 109 additions and 16 deletions
|
@ -293,6 +293,53 @@
|
|||
"KeyDelete": "Delete",
|
||||
"KeyPageUp": "Page Up",
|
||||
"KeyPageDown": "Page Down",
|
||||
"KeyHome": "Home",
|
||||
"KeyEnd": "End",
|
||||
"KeyCapsLock": "Caps Lock",
|
||||
"KeyScrollLock": "Scroll Lock",
|
||||
"KeyPrintScreen": "Print Screen",
|
||||
"KeyPause": "Pause",
|
||||
"KeyNumLock": "Num Lock",
|
||||
"KeyClear": "Clear",
|
||||
"KeyKeypad0": "Keypad 0",
|
||||
"KeyKeypad1": "Keypad 1",
|
||||
"KeyKeypad2": "Keypad 2",
|
||||
"KeyKeypad3": "Keypad 3",
|
||||
"KeyKeypad4": "Keypad 4",
|
||||
"KeyKeypad5": "Keypad 5",
|
||||
"KeyKeypad6": "Keypad 6",
|
||||
"KeyKeypad7": "Keypad 7",
|
||||
"KeyKeypad8": "Keypad 8",
|
||||
"KeyKeypad9": "Keypad 9",
|
||||
"KeyKeypadDivide": "Keypad Divide",
|
||||
"KeyKeypadMultiply": "Keypad Multiply",
|
||||
"KeyKeypadSubtract": "Keypad Subtract",
|
||||
"KeyKeypadAdd": "Keypad Add",
|
||||
"KeyKeypadDecimal": "Keypad Decimal",
|
||||
"KeyKeypadEnter": "Keypad Enter",
|
||||
"KeyNumber0": "0",
|
||||
"KeyNumber1": "1",
|
||||
"KeyNumber2": "2",
|
||||
"KeyNumber3": "3",
|
||||
"KeyNumber4": "4",
|
||||
"KeyNumber5": "5",
|
||||
"KeyNumber6": "6",
|
||||
"KeyNumber7": "7",
|
||||
"KeyNumber8": "8",
|
||||
"KeyNumber9": "9",
|
||||
"KeyTilde": "~",
|
||||
"KeyGrave": "`",
|
||||
"KeyMinus": "-",
|
||||
"KeyPlus": "+",
|
||||
"KeyBracketLeft": "[",
|
||||
"KeyBracketRight": "]",
|
||||
"KeySemicolon": ";",
|
||||
"KeyQuote": "\"",
|
||||
"KeyComma": ",",
|
||||
"KeyPeriod": ".",
|
||||
"KeySlash": "/",
|
||||
"KeyBackSlash": "\\",
|
||||
"KeyUnbound": "Unbound",
|
||||
"UserProfilesSelectedUserProfile": "Selected User Profile:",
|
||||
"UserProfilesSaveProfileName": "Save Profile Name",
|
||||
"UserProfilesChangeProfileImage": "Change Profile Image",
|
||||
|
|
|
@ -12,7 +12,8 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
internal class KeyValueConverter : IValueConverter
|
||||
{
|
||||
public static KeyValueConverter Instance = new();
|
||||
internal static readonly Dictionary<Key, LocaleKeys> KeysMap = new()
|
||||
|
||||
private static readonly Dictionary<Key, LocaleKeys> KeysMap = new()
|
||||
{
|
||||
{ Key.Unknown, LocaleKeys.KeyUnknown },
|
||||
{ Key.ShiftLeft, LocaleKeys.KeyShiftLeft },
|
||||
|
@ -36,14 +37,59 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
{ Key.Delete, LocaleKeys.KeyDelete },
|
||||
{ Key.PageUp, LocaleKeys.KeyPageUp },
|
||||
{ Key.PageDown, LocaleKeys.KeyPageDown },
|
||||
{ Key.Home, LocaleKeys.KeyHome },
|
||||
{ Key.End, LocaleKeys.KeyEnd },
|
||||
{ Key.CapsLock, LocaleKeys.KeyCapsLock },
|
||||
{ Key.ScrollLock, LocaleKeys.KeyScrollLock },
|
||||
{ Key.PrintScreen, LocaleKeys.KeyPrintScreen },
|
||||
{ Key.Pause, LocaleKeys.KeyPause },
|
||||
{ Key.NumLock, LocaleKeys.KeyNumLock },
|
||||
{ Key.Clear, LocaleKeys.KeyClear },
|
||||
{ Key.Keypad0, LocaleKeys.KeyKeypad0 },
|
||||
{ Key.Keypad1, LocaleKeys.KeyKeypad1 },
|
||||
{ Key.Keypad2, LocaleKeys.KeyKeypad2 },
|
||||
{ Key.Keypad3, LocaleKeys.KeyKeypad3 },
|
||||
{ Key.Keypad4, LocaleKeys.KeyKeypad4 },
|
||||
{ Key.Keypad5, LocaleKeys.KeyKeypad5 },
|
||||
{ Key.Keypad6, LocaleKeys.KeyKeypad6 },
|
||||
{ Key.Keypad7, LocaleKeys.KeyKeypad7 },
|
||||
{ Key.Keypad8, LocaleKeys.KeyKeypad8 },
|
||||
{ Key.Keypad9, LocaleKeys.KeyKeypad9 },
|
||||
{ Key.KeypadDivide, LocaleKeys.KeyKeypadDivide },
|
||||
{ Key.KeypadMultiply, LocaleKeys.KeyKeypadMultiply },
|
||||
{ Key.KeypadSubtract, LocaleKeys.KeyKeypadSubtract },
|
||||
{ Key.KeypadAdd, LocaleKeys.KeyKeypadAdd },
|
||||
{ Key.KeypadDecimal, LocaleKeys.KeyKeypadDecimal },
|
||||
{ Key.KeypadEnter, LocaleKeys.KeyKeypadEnter },
|
||||
{ Key.Number0, LocaleKeys.KeyNumber0 },
|
||||
{ Key.Number1, LocaleKeys.KeyNumber1 },
|
||||
{ Key.Number2, LocaleKeys.KeyNumber2 },
|
||||
{ Key.Number3, LocaleKeys.KeyNumber3 },
|
||||
{ Key.Number4, LocaleKeys.KeyNumber4 },
|
||||
{ Key.Number5, LocaleKeys.KeyNumber5 },
|
||||
{ Key.Number6, LocaleKeys.KeyNumber6 },
|
||||
{ Key.Number7, LocaleKeys.KeyNumber7 },
|
||||
{ Key.Number8, LocaleKeys.KeyNumber8 },
|
||||
{ Key.Number9, LocaleKeys.KeyNumber9 },
|
||||
{ Key.Tilde, LocaleKeys.KeyTilde },
|
||||
{ Key.Grave, LocaleKeys.KeyGrave },
|
||||
{ Key.Minus, LocaleKeys.KeyMinus },
|
||||
{ Key.Plus, LocaleKeys.KeyPlus },
|
||||
{ Key.BracketLeft, LocaleKeys.KeyBracketLeft },
|
||||
{ Key.BracketRight, LocaleKeys.KeyBracketRight },
|
||||
{ Key.Semicolon, LocaleKeys.KeySemicolon },
|
||||
{ Key.Quote, LocaleKeys.KeyQuote },
|
||||
{ Key.Comma, LocaleKeys.KeyComma },
|
||||
{ Key.Period, LocaleKeys.KeyPeriod },
|
||||
{ Key.Slash, LocaleKeys.KeySlash },
|
||||
{ Key.BackSlash, LocaleKeys.KeyBackSlash },
|
||||
{ Key.Unbound, LocaleKeys.KeyUnbound },
|
||||
};
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
string keyString = "";
|
||||
|
||||
if (value != null)
|
||||
{
|
||||
if (value is Key key)
|
||||
{
|
||||
if (KeysMap.TryGetValue(key, out LocaleKeys localeKey))
|
||||
|
@ -60,8 +106,8 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
keyString = value.ToString();
|
||||
}
|
||||
else if (value is StickInputId stickInputId)
|
||||
{ keyString = value.ToString();
|
||||
}
|
||||
{
|
||||
keyString = value.ToString();
|
||||
}
|
||||
|
||||
return keyString;
|
||||
|
|
Loading…
Reference in a new issue