mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-23 04:27:10 +02:00
UI: Compatibility List Viewer
This commit is contained in:
parent
9726b0feb0
commit
c4cc657b89
13 changed files with 612 additions and 1 deletions
28
src/Ryujinx/UI/Helpers/PlayabilityStatusConverter.cs
Normal file
28
src/Ryujinx/UI/Helpers/PlayabilityStatusConverter.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
using Gommon;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Helpers
|
||||
{
|
||||
public class PlayabilityStatusConverter : IValueConverter
|
||||
{
|
||||
private static readonly Lazy<PlayabilityStatusConverter> _shared = new(() => new());
|
||||
public static PlayabilityStatusConverter Shared => _shared.Value;
|
||||
|
||||
public object Convert(object? value, Type _, object? __, CultureInfo ___) =>
|
||||
value.Cast<LocaleKeys>() switch
|
||||
{
|
||||
LocaleKeys.CompatibilityListNothing or
|
||||
LocaleKeys.CompatibilityListBoots or
|
||||
LocaleKeys.CompatibilityListMenus => Brushes.Red,
|
||||
LocaleKeys.CompatibilityListIngame => Brushes.Yellow,
|
||||
_ => Brushes.ForestGreen
|
||||
};
|
||||
|
||||
public object ConvertBack(object? value, Type _, object? __, CultureInfo ___)
|
||||
=> throw new NotSupportedException();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue