mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-21 07:17:45 +01:00
Create PluginStatsWindow and track times for plugin BuildUI event
This commit is contained in:
parent
cf212e33d6
commit
77d4502b60
3 changed files with 123 additions and 0 deletions
|
|
@ -211,6 +211,7 @@ namespace Dalamud {
|
|||
private bool isImguiDrawPluginWindow = false;
|
||||
private bool isImguiDrawCreditsWindow = false;
|
||||
private bool isImguiDrawSettingsWindow = false;
|
||||
private bool isImguiDrawPluginStatWindow = false;
|
||||
|
||||
private DalamudLogWindow logWindow;
|
||||
private DalamudDataWindow dataWindow;
|
||||
|
|
@ -218,6 +219,7 @@ namespace Dalamud {
|
|||
private DalamudSettingsWindow settingsWindow;
|
||||
private PluginInstallerWindow pluginWindow;
|
||||
private ConditionDebugWindow conditionDebugWindow;
|
||||
private DalamudPluginStatWindow pluginStatWindow;
|
||||
|
||||
private void BuildDalamudUi()
|
||||
{
|
||||
|
|
@ -294,6 +296,12 @@ namespace Dalamud {
|
|||
this.pluginWindow = new PluginInstallerWindow(this.PluginManager, this.PluginRepository, this.StartInfo.GameVersion);
|
||||
this.isImguiDrawPluginWindow = true;
|
||||
}
|
||||
if (ImGui.MenuItem("Open Plugin Stats")) {
|
||||
if (!this.isImguiDrawPluginStatWindow) {
|
||||
this.pluginStatWindow = new DalamudPluginStatWindow(this.PluginManager);
|
||||
this.isImguiDrawPluginStatWindow = true;
|
||||
}
|
||||
}
|
||||
if (ImGui.MenuItem("Print plugin info")) {
|
||||
foreach (var plugin in this.PluginManager.Plugins) {
|
||||
// TODO: some more here, state maybe?
|
||||
|
|
@ -396,6 +404,14 @@ namespace Dalamud {
|
|||
{
|
||||
this.conditionDebugWindow.Draw();
|
||||
}
|
||||
|
||||
if (this.isImguiDrawPluginStatWindow) {
|
||||
this.isImguiDrawPluginStatWindow = this.pluginStatWindow != null && this.pluginStatWindow.Draw();
|
||||
if (!this.isImguiDrawPluginStatWindow) {
|
||||
this.pluginStatWindow?.Dispose();
|
||||
this.pluginStatWindow = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue