UI: Show playability information under game version in List view
This commit is contained in:
parent
11e4d8f970
commit
c812106611
@ -23069,7 +23069,7 @@
|
|||||||
"tr_TR": "",
|
"tr_TR": "",
|
||||||
"uk_UA": "",
|
"uk_UA": "",
|
||||||
"zh_CN": "可游玩",
|
"zh_CN": "可游玩",
|
||||||
"zh_TW": "可暢順遊玩 (Playable)"
|
"zh_TW": "可暢順遊玩"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -23094,7 +23094,7 @@
|
|||||||
"tr_TR": "",
|
"tr_TR": "",
|
||||||
"uk_UA": "",
|
"uk_UA": "",
|
||||||
"zh_CN": "进入游戏",
|
"zh_CN": "进入游戏",
|
||||||
"zh_TW": "大致可遊玩 (Ingame)"
|
"zh_TW": "大致可遊玩"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -23119,7 +23119,7 @@
|
|||||||
"tr_TR": "",
|
"tr_TR": "",
|
||||||
"uk_UA": "",
|
"uk_UA": "",
|
||||||
"zh_CN": "菜单",
|
"zh_CN": "菜单",
|
||||||
"zh_TW": "只開啟至遊戲開始功能表 (Menus)"
|
"zh_TW": "只開啟至遊戲開始功能表"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -23144,7 +23144,7 @@
|
|||||||
"tr_TR": "",
|
"tr_TR": "",
|
||||||
"uk_UA": "",
|
"uk_UA": "",
|
||||||
"zh_CN": "启动",
|
"zh_CN": "启动",
|
||||||
"zh_TW": "只能啟動 (Boots)"
|
"zh_TW": "只能啟動"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -23169,7 +23169,7 @@
|
|||||||
"tr_TR": "",
|
"tr_TR": "",
|
||||||
"uk_UA": "",
|
"uk_UA": "",
|
||||||
"zh_CN": "什么都没有",
|
"zh_CN": "什么都没有",
|
||||||
"zh_TW": "無法啟動 (Nothing)"
|
"zh_TW": "無法啟動"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -86,6 +86,13 @@
|
|||||||
Text="{Binding Version}"
|
Text="{Binding Version}"
|
||||||
TextAlignment="Start"
|
TextAlignment="Start"
|
||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
|
<TextBlock
|
||||||
|
IsVisible="{Binding HasPlayabilityInfo}"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Text="{Binding LocalizedStatus}"
|
||||||
|
Foreground="{Binding PlayabilityStatus, Converter={x:Static helpers:PlayabilityStatusConverter.Shared}}"
|
||||||
|
TextAlignment="Start"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
|
@ -7,6 +7,8 @@ using LibHac.Ns;
|
|||||||
using LibHac.Tools.Fs;
|
using LibHac.Tools.Fs;
|
||||||
using LibHac.Tools.FsSystem;
|
using LibHac.Tools.FsSystem;
|
||||||
using LibHac.Tools.FsSystem.NcaUtils;
|
using LibHac.Tools.FsSystem.NcaUtils;
|
||||||
|
using Ryujinx.Ava.Common.Locale;
|
||||||
|
using Ryujinx.Ava.Utilities.Compat;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.HLE.FileSystem;
|
using Ryujinx.HLE.FileSystem;
|
||||||
using Ryujinx.HLE.Loaders.Processes.Extensions;
|
using Ryujinx.HLE.Loaders.Processes.Extensions;
|
||||||
@ -21,9 +23,30 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
|||||||
public bool Favorite { get; set; }
|
public bool Favorite { get; set; }
|
||||||
public byte[] Icon { get; set; }
|
public byte[] Icon { get; set; }
|
||||||
public string Name { get; set; } = "Unknown";
|
public string Name { get; set; } = "Unknown";
|
||||||
public ulong Id { get; set; }
|
|
||||||
|
private ulong _id;
|
||||||
|
|
||||||
|
public ulong Id
|
||||||
|
{
|
||||||
|
get => _id;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_id = value;
|
||||||
|
PlayabilityStatus = CompatibilityCsv.GetStatus(Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
public string Developer { get; set; } = "Unknown";
|
public string Developer { get; set; } = "Unknown";
|
||||||
public string Version { get; set; } = "0";
|
public string Version { get; set; } = "0";
|
||||||
|
|
||||||
|
public bool HasPlayabilityInfo => PlayabilityStatus != null;
|
||||||
|
|
||||||
|
public string LocalizedStatus =>
|
||||||
|
PlayabilityStatus.HasValue
|
||||||
|
? LocaleManager.Instance[PlayabilityStatus!.Value]
|
||||||
|
: string.Empty;
|
||||||
|
|
||||||
|
public LocaleKeys? PlayabilityStatus { get; set; }
|
||||||
|
|
||||||
public int PlayerCount { get; set; }
|
public int PlayerCount { get; set; }
|
||||||
public int GameCount { get; set; }
|
public int GameCount { get; set; }
|
||||||
public TimeSpan TimePlayed { get; set; }
|
public TimeSpan TimePlayed { get; set; }
|
||||||
|
@ -47,11 +47,6 @@ namespace Ryujinx.Ava.Utilities.Compat
|
|||||||
Logger.Debug?.Print(LogClass.UI, "Compatibility CSV loaded.", "LoadCompatibility");
|
Logger.Debug?.Print(LogClass.UI, "Compatibility CSV loaded.", "LoadCompatibility");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Unload()
|
|
||||||
{
|
|
||||||
_entries = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static CompatibilityEntry[] _entries;
|
private static CompatibilityEntry[] _entries;
|
||||||
|
|
||||||
public static CompatibilityEntry[] Entries
|
public static CompatibilityEntry[] Entries
|
||||||
@ -64,6 +59,11 @@ namespace Ryujinx.Ava.Utilities.Compat
|
|||||||
return _entries;
|
return _entries;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static LocaleKeys? GetStatus(string titleId)
|
||||||
|
=> Entries.FirstOrDefault(x => x.TitleId.HasValue && x.TitleId.Value.EqualsIgnoreCase(titleId))?.Status;
|
||||||
|
|
||||||
|
public static LocaleKeys? GetStatus(ulong titleId) => GetStatus(titleId.ToString("X16"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CompatibilityEntry
|
public class CompatibilityEntry
|
||||||
|
@ -32,8 +32,6 @@ namespace Ryujinx.Ava.Utilities.Compat
|
|||||||
contentDialog.Styles.Add(closeButtonParent);
|
contentDialog.Styles.Add(closeButtonParent);
|
||||||
|
|
||||||
await ContentDialogHelper.ShowAsync(contentDialog);
|
await ContentDialogHelper.ShowAsync(contentDialog);
|
||||||
|
|
||||||
CompatibilityCsv.Unload();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public CompatibilityList()
|
public CompatibilityList()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user