22 lines
457 B
C#
22 lines
457 B
C#
using ImGuiNET;
|
|
|
|
namespace SzGui.Windows;
|
|
|
|
public abstract class SzGuiWindowBase
|
|
{
|
|
public bool IsOpen = true;
|
|
public string WindowName { get; protected set; } = "Window";
|
|
|
|
public virtual void Draw()
|
|
{
|
|
if (!IsOpen) return;
|
|
|
|
if (ImGui.Begin(WindowName, ref IsOpen, ImGuiWindowFlags.MenuBar))
|
|
{
|
|
RenderContent();
|
|
}
|
|
ImGui.End();
|
|
}
|
|
|
|
protected abstract void RenderContent();
|
|
} |