mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 06:46:24 +02:00
Extended hotkeys to player1-8 + h, localized the overlay
This commit is contained in:
parent
0afc910f39
commit
72752d2c4b
16 changed files with 338 additions and 79 deletions
|
@ -0,0 +1,28 @@
|
|||
using Avalonia.Data.Converters;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Helpers
|
||||
{
|
||||
internal class PlayerHotkeyLabelConverter : IValueConverter
|
||||
{
|
||||
public static readonly PlayerHotkeyLabelConverter Instance = new();
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is string playerName && !string.IsNullOrEmpty(playerName))
|
||||
{
|
||||
string baseText = LocaleManager.Instance[LocaleKeys.SettingsTabHotkeysCycleInputDevicePlayerX];
|
||||
return string.Format(baseText, playerName);
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue