mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-27 05:57:11 +02:00
UI: Expose games build ID for cheat management (#4340)
* Ava UI: Expose games build ID for cheat management * Fix bad merge * Change integrity check level to error on invalid * Add support for GDK * Remove whitespace * Add BID identifier * PR Comments fix * Restore title id in cheats GTK window * use halign center instead of margin_left * Merge * fix after merge * PR comments fix - design AVA * PR fix - Move GetApplicationBuildId to ApplicationData class * PR comment fix - Add empty line before method * Align with PR #4755 * PR comments fix * Change BuildId label to support translation * Comments fix * Remove unused BuildIdLabel property
This commit is contained in:
parent
4c3d2d5d75
commit
dde208b480
10 changed files with 210 additions and 15 deletions
|
@ -1626,9 +1626,12 @@ namespace Ryujinx.Ui
|
|||
|
||||
private void ManageCheats_Pressed(object sender, EventArgs args)
|
||||
{
|
||||
var window = new CheatWindow(_virtualFileSystem,
|
||||
_emulationContext.Processes.ActiveApplication.ProgramId,
|
||||
_emulationContext.Processes.ActiveApplication.ApplicationControlProperties.Title[(int)_emulationContext.System.State.DesiredTitleLanguage].NameString.ToString());
|
||||
var window = new CheatWindow(
|
||||
_virtualFileSystem,
|
||||
_emulationContext.Processes.ActiveApplication.ProgramId,
|
||||
_emulationContext.Processes.ActiveApplication.ApplicationControlProperties
|
||||
.Title[(int)_emulationContext.System.State.DesiredTitleLanguage].NameString.ToString(),
|
||||
_currentEmulatedGamePath);
|
||||
|
||||
window.Destroyed += CheatWindow_Destroyed;
|
||||
window.Show();
|
||||
|
|
|
@ -461,7 +461,7 @@ namespace Ryujinx.Ui.Widgets
|
|||
|
||||
private void ManageCheats_Clicked(object sender, EventArgs args)
|
||||
{
|
||||
new CheatWindow(_virtualFileSystem, _titleId, _titleName).Show();
|
||||
new CheatWindow(_virtualFileSystem, _titleId, _titleName, _titleFilePath).Show();
|
||||
}
|
||||
|
||||
private void OpenTitleModDir_Clicked(object sender, EventArgs args)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using Gtk;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using Ryujinx.HLE.HOS;
|
||||
using Ryujinx.Ui.App.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
@ -17,16 +18,18 @@ namespace Ryujinx.Ui.Windows
|
|||
|
||||
#pragma warning disable CS0649, IDE0044
|
||||
[GUI] Label _baseTitleInfoLabel;
|
||||
[GUI] TextView _buildIdTextView;
|
||||
[GUI] TreeView _cheatTreeView;
|
||||
[GUI] Button _saveButton;
|
||||
#pragma warning restore CS0649, IDE0044
|
||||
|
||||
public CheatWindow(VirtualFileSystem virtualFileSystem, ulong titleId, string titleName) : this(new Builder("Ryujinx.Ui.Windows.CheatWindow.glade"), virtualFileSystem, titleId, titleName) { }
|
||||
public CheatWindow(VirtualFileSystem virtualFileSystem, ulong titleId, string titleName, string titlePath) : this(new Builder("Ryujinx.Ui.Windows.CheatWindow.glade"), virtualFileSystem, titleId, titleName, titlePath) { }
|
||||
|
||||
private CheatWindow(Builder builder, VirtualFileSystem virtualFileSystem, ulong titleId, string titleName) : base(builder.GetRawOwnedObject("_cheatWindow"))
|
||||
private CheatWindow(Builder builder, VirtualFileSystem virtualFileSystem, ulong titleId, string titleName, string titlePath) : base(builder.GetRawOwnedObject("_cheatWindow"))
|
||||
{
|
||||
builder.Autoconnect(this);
|
||||
_baseTitleInfoLabel.Text = $"Cheats Available for {titleName} [{titleId:X16}]";
|
||||
_buildIdTextView.Buffer.Text = $"BuildId: {ApplicationData.GetApplicationBuildId(virtualFileSystem, titlePath)}";
|
||||
|
||||
string modsBasePath = ModLoader.GetModsBasePath();
|
||||
string titleModsPath = ModLoader.GetTitleDir(modsBasePath, titleId.ToString("X16"));
|
||||
|
|
|
@ -31,6 +31,21 @@
|
|||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTextView" id="_buildIdTextView">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin_top">10</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin_bottom">10</property>
|
||||
<property name="editable">False</property>
|
||||
<property name="cursor_visible">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
|
@ -57,7 +72,7 @@
|
|||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue