feat: add OpenMainUi event on UiBuilder, respective button in PI

This commit is contained in:
goat 2023-08-22 22:20:08 +02:00
parent c027aacde2
commit 3272dbb0e2
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
3 changed files with 69 additions and 4 deletions

View file

@ -7,6 +7,7 @@ using Dalamud.Interface.Windowing;
using Dalamud.Logging;
using Dalamud.Plugin;
using Dalamud.Utility;
using Serilog;
namespace Dalamud.CorePlugin
{
@ -66,6 +67,7 @@ namespace Dalamud.CorePlugin
this.Interface.UiBuilder.Draw += this.OnDraw;
this.Interface.UiBuilder.OpenConfigUi += this.OnOpenConfigUi;
this.Interface.UiBuilder.OpenMainUi += this.OnOpenMainUi;
Service<CommandManager>.Get().AddHandler("/coreplug", new(this.OnCommand) { HelpMessage = $"Access the {this.Name} plugin." });
@ -143,6 +145,11 @@ namespace Dalamud.CorePlugin
// this.window.IsOpen = true;
}
private void OnOpenMainUi()
{
Log.Verbose("Opened main UI");
}
#endif
}
}