|
@@ -17,7 +17,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|
|
private readonly string _enabledCheatsPath;
|
|
private readonly string _enabledCheatsPath;
|
|
|
public bool NoCheatsFound { get; }
|
|
public bool NoCheatsFound { get; }
|
|
|
|
|
|
|
|
- public AvaloniaList<CheatsList> LoadedCheats { get; }
|
|
|
|
|
|
|
+ public AvaloniaList<CheatNode> LoadedCheats { get; }
|
|
|
|
|
|
|
|
public string Heading { get; }
|
|
public string Heading { get; }
|
|
|
public string BuildId { get; }
|
|
public string BuildId { get; }
|
|
@@ -33,7 +33,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|
|
|
|
|
|
|
public CheatWindow(VirtualFileSystem virtualFileSystem, string titleId, string titleName, string titlePath)
|
|
public CheatWindow(VirtualFileSystem virtualFileSystem, string titleId, string titleName, string titlePath)
|
|
|
{
|
|
{
|
|
|
- LoadedCheats = new AvaloniaList<CheatsList>();
|
|
|
|
|
|
|
+ LoadedCheats = new AvaloniaList<CheatNode>();
|
|
|
|
|
|
|
|
Heading = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.CheatWindowHeading, titleName, titleId.ToUpper());
|
|
Heading = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.CheatWindowHeading, titleName, titleId.ToUpper());
|
|
|
BuildId = ApplicationData.GetApplicationBuildId(virtualFileSystem, titlePath);
|
|
BuildId = ApplicationData.GetApplicationBuildId(virtualFileSystem, titlePath);
|
|
@@ -62,7 +62,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|
|
string currentCheatFile = string.Empty;
|
|
string currentCheatFile = string.Empty;
|
|
|
string buildId = string.Empty;
|
|
string buildId = string.Empty;
|
|
|
|
|
|
|
|
- CheatsList currentGroup = null;
|
|
|
|
|
|
|
+ CheatNode currentGroup = null;
|
|
|
|
|
|
|
|
foreach (var cheat in mods.Cheats)
|
|
foreach (var cheat in mods.Cheats)
|
|
|
{
|
|
{
|
|
@@ -72,13 +72,13 @@ namespace Ryujinx.Ava.UI.Windows
|
|
|
string parentPath = currentCheatFile.Replace(titleModsPath, "");
|
|
string parentPath = currentCheatFile.Replace(titleModsPath, "");
|
|
|
|
|
|
|
|
buildId = Path.GetFileNameWithoutExtension(currentCheatFile).ToUpper();
|
|
buildId = Path.GetFileNameWithoutExtension(currentCheatFile).ToUpper();
|
|
|
- currentGroup = new CheatsList(buildId, parentPath);
|
|
|
|
|
|
|
+ currentGroup = new CheatNode("", buildId, parentPath, true);
|
|
|
|
|
|
|
|
LoadedCheats.Add(currentGroup);
|
|
LoadedCheats.Add(currentGroup);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- var model = new CheatModel(cheat.Name, buildId, enabled.Contains($"{buildId}-{cheat.Name}"));
|
|
|
|
|
- currentGroup?.Add(model);
|
|
|
|
|
|
|
+ var model = new CheatNode(cheat.Name, buildId, "", false, enabled.Contains($"{buildId}-{cheat.Name}"));
|
|
|
|
|
+ currentGroup?.SubNodes.Add(model);
|
|
|
|
|
|
|
|
cheatAdded++;
|
|
cheatAdded++;
|
|
|
}
|
|
}
|
|
@@ -104,7 +104,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|
|
|
|
|
|
|
foreach (var cheats in LoadedCheats)
|
|
foreach (var cheats in LoadedCheats)
|
|
|
{
|
|
{
|
|
|
- foreach (var cheat in cheats)
|
|
|
|
|
|
|
+ foreach (var cheat in cheats.SubNodes)
|
|
|
{
|
|
{
|
|
|
if (cheat.IsEnabled)
|
|
if (cheat.IsEnabled)
|
|
|
{
|
|
{
|