-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
612 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.