Extended hotkeys to player1-8 + h, localized the overlay

This commit is contained in:
Barış Hamil 2025-06-21 01:34:50 +03:00
parent 0afc910f39
commit 72752d2c4b
16 changed files with 338 additions and 79 deletions

View file

@ -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();
}
}
}