Add Draw after setting up everything else to prevent exception.

This commit is contained in:
Ottermandias 2022-07-01 20:46:55 +02:00
parent 99eb08958c
commit 885dcbdf04

View file

@ -136,6 +136,7 @@ public class Penumbra : IDalamudPlugin
{ {
PluginLog.Information( $"Penumbra Version {Version}, Commit #{CommitHash} successfully Loaded." ); PluginLog.Information( $"Penumbra Version {Version}, Commit #{CommitHash} successfully Loaded." );
} }
Dalamud.PluginInterface.UiBuilder.Draw += _windowSystem.Draw;
} }
private void SetupInterface( out ConfigWindow cfg, out LaunchButton btn, out WindowSystem system ) private void SetupInterface( out ConfigWindow cfg, out LaunchButton btn, out WindowSystem system )
@ -145,7 +146,6 @@ public class Penumbra : IDalamudPlugin
system = new WindowSystem( Name ); system = new WindowSystem( Name );
system.AddWindow( _configWindow ); system.AddWindow( _configWindow );
system.AddWindow( cfg.ModEditPopup ); system.AddWindow( cfg.ModEditPopup );
Dalamud.PluginInterface.UiBuilder.Draw += system.Draw;
Dalamud.PluginInterface.UiBuilder.OpenConfigUi += cfg.Toggle; Dalamud.PluginInterface.UiBuilder.OpenConfigUi += cfg.Toggle;
} }