feat: Window.PreConditionals() -> PreDraw(), add PostDraw()

This commit is contained in:
goat 2021-09-01 15:59:41 +02:00
parent 2ef5a9706d
commit d2597f7520
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -114,9 +114,16 @@ namespace Dalamud.Interface.Windowing
} }
/// <summary> /// <summary>
/// Code to be executed before conditionals are applied. /// Code to be executed before conditionals are applied and the window is drawn.
/// </summary> /// </summary>
public virtual void PreConditionals() public virtual void PreDraw()
{
}
/// <summary>
/// Code to be executed after the window is drawn.
/// </summary>
public virtual void PostDraw()
{ {
} }
@ -164,7 +171,7 @@ namespace Dalamud.Interface.Windowing
if (hasNamespace) if (hasNamespace)
ImGui.PushID(this.Namespace); ImGui.PushID(this.Namespace);
this.PreConditionals(); this.PreDraw();
this.ApplyConditionals(); this.ApplyConditionals();
if (this.ForceMainWindow) if (this.ForceMainWindow)
@ -195,6 +202,8 @@ namespace Dalamud.Interface.Windowing
ImGui.End(); ImGui.End();
this.PostDraw();
if (hasNamespace) if (hasNamespace)
ImGui.PopID(); ImGui.PopID();
} }