Files
ryujinx/src/Ryujinx/UI/Helpers/Converters/LocaleKeyValueConverter.cs
GreemDev 6e47d8548c feature: UI: LDN Games Viewer
This window can be accessed via "Help" menu in the title bar.
This menu's data is synced with the in-app-list LDN game data, and that has been modified to hide unjoinable games (in-progress and/or private (needing a passphrase)). You can still see these games in the list.
2025-08-30 19:54:00 -05:00

21 lines
678 B
C#

using Avalonia.Data.Converters;
using CommandLine;
using Ryujinx.Ava.Common.Locale;
using System;
using System.Globalization;
namespace Ryujinx.Ava.UI.Helpers
{
public class LocaleKeyValueConverter : IValueConverter
{
private static readonly Lazy<LocaleKeyValueConverter> _shared = new(() => new());
public static LocaleKeyValueConverter Shared => _shared.Value;
public object Convert(object value, Type _, object __, CultureInfo ___)
=> LocaleManager.Instance[value.Cast<LocaleKeys>()];
public object ConvertBack(object value, Type _, object __, CultureInfo ___)
=> throw new NotSupportedException();
}
}