From d2597f7520f53b1677543de817781c13393f18ff Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Wed, 1 Sep 2021 15:59:41 +0200 Subject: [PATCH] feat: Window.PreConditionals() -> PreDraw(), add PostDraw() --- Dalamud/Interface/Windowing/Window.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Dalamud/Interface/Windowing/Window.cs b/Dalamud/Interface/Windowing/Window.cs index 5688b94a6..2efa38ff3 100644 --- a/Dalamud/Interface/Windowing/Window.cs +++ b/Dalamud/Interface/Windowing/Window.cs @@ -114,9 +114,16 @@ namespace Dalamud.Interface.Windowing } /// - /// Code to be executed before conditionals are applied. + /// Code to be executed before conditionals are applied and the window is drawn. /// - public virtual void PreConditionals() + public virtual void PreDraw() + { + } + + /// + /// Code to be executed after the window is drawn. + /// + public virtual void PostDraw() { } @@ -164,7 +171,7 @@ namespace Dalamud.Interface.Windowing if (hasNamespace) ImGui.PushID(this.Namespace); - this.PreConditionals(); + this.PreDraw(); this.ApplyConditionals(); if (this.ForceMainWindow) @@ -195,6 +202,8 @@ namespace Dalamud.Interface.Windowing ImGui.End(); + this.PostDraw(); + if (hasNamespace) ImGui.PopID(); }