mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: add some texture load debug to Data window
This commit is contained in:
parent
d6cd69508a
commit
c0e34420a7
2 changed files with 27 additions and 2 deletions
|
|
@ -251,7 +251,7 @@ namespace Dalamud
|
|||
}
|
||||
}
|
||||
|
||||
this.Data = new DataManager(this.StartInfo.Language);
|
||||
this.Data = new DataManager(this.StartInfo.Language, this.InterfaceManager);
|
||||
try
|
||||
{
|
||||
this.Data.Initialize(this.AssetDirectory.FullName);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ using Dalamud.Interface.Colors;
|
|||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Plugin;
|
||||
using ImGuiNET;
|
||||
using ImGuiScene;
|
||||
using Newtonsoft.Json;
|
||||
using Serilog;
|
||||
|
||||
|
|
@ -35,7 +36,7 @@ namespace Dalamud.Interface
|
|||
private string[] dataKinds = new[]
|
||||
{
|
||||
"ServerOpCode", "Address", "Actor Table", "Font Test", "Party List", "Plugin IPC", "Condition",
|
||||
"Gauge", "Command", "Addon", "Addon Inspector", "StartInfo", "Target", "Toast", "ImGui"
|
||||
"Gauge", "Command", "Addon", "Addon Inspector", "StartInfo", "Target", "Toast", "ImGui", "Tex",
|
||||
};
|
||||
|
||||
private bool drawActors = false;
|
||||
|
|
@ -62,6 +63,9 @@ namespace Dalamud.Interface
|
|||
private int questToastIconId = 0;
|
||||
private bool questToastCheckmark = false;
|
||||
|
||||
private string inputTexPath = string.Empty;
|
||||
private TextureWrap debugTex = null;
|
||||
|
||||
private uint copyButtonIndex = 0;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -347,6 +351,27 @@ namespace Dalamud.Interface
|
|||
ImGui.Text("Monitor count: " + ImGui.GetPlatformIO().Monitors.Size);
|
||||
|
||||
break;
|
||||
|
||||
// Tex
|
||||
case 15:
|
||||
ImGui.InputText("Tex Path", ref this.inputTexPath, 255);
|
||||
|
||||
if (ImGui.Button("Load Tex"))
|
||||
{
|
||||
try
|
||||
{
|
||||
this.debugTex = this.dalamud.Data.GetImGuiTexture(this.inputTexPath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Could not load tex.");
|
||||
}
|
||||
}
|
||||
|
||||
if (this.debugTex != null)
|
||||
ImGui.Image(this.debugTex.ImGuiHandle, new Vector2(this.debugTex.Width, this.debugTex.Height));
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue