mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-18 11:48:47 -05:00
[GUI] Add option to display debug info for some assets
This commit is contained in:
+11
@@ -101,6 +101,7 @@
|
|||||||
this.showConsoleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.showConsoleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.writeLogToFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.writeLogToFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.showAssetDebugInfoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.exportClassStructuresMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.exportClassStructuresMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.colorThemeToolStripMenu = new System.Windows.Forms.ToolStripMenuItem();
|
this.colorThemeToolStripMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
@@ -791,6 +792,7 @@
|
|||||||
this.showConsoleToolStripMenuItem,
|
this.showConsoleToolStripMenuItem,
|
||||||
this.toolStripMenuItem15,
|
this.toolStripMenuItem15,
|
||||||
this.writeLogToFileToolStripMenuItem,
|
this.writeLogToFileToolStripMenuItem,
|
||||||
|
this.showAssetDebugInfoToolStripMenuItem,
|
||||||
this.exportClassStructuresMenuItem});
|
this.exportClassStructuresMenuItem});
|
||||||
this.debugMenuItem.Name = "debugMenuItem";
|
this.debugMenuItem.Name = "debugMenuItem";
|
||||||
this.debugMenuItem.Size = new System.Drawing.Size(54, 20);
|
this.debugMenuItem.Size = new System.Drawing.Size(54, 20);
|
||||||
@@ -822,6 +824,14 @@
|
|||||||
this.writeLogToFileToolStripMenuItem.Text = "Write log to file";
|
this.writeLogToFileToolStripMenuItem.Text = "Write log to file";
|
||||||
this.writeLogToFileToolStripMenuItem.CheckedChanged += new System.EventHandler(this.writeLogToFileToolStripMenuItem_CheckedChanged);
|
this.writeLogToFileToolStripMenuItem.CheckedChanged += new System.EventHandler(this.writeLogToFileToolStripMenuItem_CheckedChanged);
|
||||||
//
|
//
|
||||||
|
// showAssetDebugInfoToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.showAssetDebugInfoToolStripMenuItem.CheckOnClick = true;
|
||||||
|
this.showAssetDebugInfoToolStripMenuItem.Name = "showAssetDebugInfoToolStripMenuItem";
|
||||||
|
this.showAssetDebugInfoToolStripMenuItem.Size = new System.Drawing.Size(288, 22);
|
||||||
|
this.showAssetDebugInfoToolStripMenuItem.Text = "Display asset debug info";
|
||||||
|
this.showAssetDebugInfoToolStripMenuItem.Click += new System.EventHandler(this.showAssetDebugInfoToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// exportClassStructuresMenuItem
|
// exportClassStructuresMenuItem
|
||||||
//
|
//
|
||||||
this.exportClassStructuresMenuItem.Name = "exportClassStructuresMenuItem";
|
this.exportClassStructuresMenuItem.Name = "exportClassStructuresMenuItem";
|
||||||
@@ -1940,6 +1950,7 @@
|
|||||||
private System.Windows.Forms.ToolStripMenuItem jsonDumpAllToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem jsonDumpAllToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem jsonDumpSelectToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem jsonDumpSelectToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem jsonDumpFilterToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem jsonDumpFilterToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem showAssetDebugInfoToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ namespace AssetStudioGUI
|
|||||||
private string tempClipboard;
|
private string tempClipboard;
|
||||||
private bool isDarkMode;
|
private bool isDarkMode;
|
||||||
private GameOptionsForm gameOptionsForm;
|
private GameOptionsForm gameOptionsForm;
|
||||||
|
private bool showAssetDebugInfo;
|
||||||
|
|
||||||
#region FMODControl
|
#region FMODControl
|
||||||
private FMOD.System system;
|
private FMOD.System system;
|
||||||
@@ -1138,7 +1139,7 @@ namespace AssetStudioGUI
|
|||||||
FMODinfoLabel.Text = frequency + " Hz";
|
FMODinfoLabel.Text = frequency + " Hz";
|
||||||
FMODtimerLabel.Text = $"00:00.00 / {(FMODlenms / 1000 / 60):00}:{(FMODlenms / 1000 % 60):00}.{(FMODlenms / 10 % 100):00}";
|
FMODtimerLabel.Text = $"00:00.00 / {(FMODlenms / 1000 / 60):00}:{(FMODlenms / 1000 % 60):00}.{(FMODlenms / 10 % 100):00}";
|
||||||
|
|
||||||
sound.getFormat(out _, out _, out var audioChannels, out _);
|
sound.getFormat(out var soundType, out var soundFormat, out var audioChannels, out _);
|
||||||
switch (audioChannels)
|
switch (audioChannels)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
@@ -1151,6 +1152,12 @@ namespace AssetStudioGUI
|
|||||||
FMODaudioChannelsLabel.Text = $"{audioChannels}-Channel";
|
FMODaudioChannelsLabel.Text = $"{audioChannels}-Channel";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (showAssetDebugInfo)
|
||||||
|
{
|
||||||
|
assetItem.InfoText += $"\nSound type: {soundType}";
|
||||||
|
assetItem.InfoText += $"\nSound format: {soundFormat}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PreviewVideoClip(AssetItem assetItem, VideoClip m_VideoClip)
|
private void PreviewVideoClip(AssetItem assetItem, VideoClip m_VideoClip)
|
||||||
@@ -2728,6 +2735,11 @@ namespace AssetStudioGUI
|
|||||||
assetsManager.Options.GameSpecific.CustomUnityVersion = null;
|
assetsManager.Options.GameSpecific.CustomUnityVersion = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showAssetDebugInfoToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
showAssetDebugInfo = !showAssetDebugInfo;
|
||||||
|
}
|
||||||
|
|
||||||
#region FMOD
|
#region FMOD
|
||||||
private void FMODinit()
|
private void FMODinit()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user