Lots of SzGui work
This commit is contained in:
22
SzGui/Windows/SzGuiWindowBase.cs
Normal file
22
SzGui/Windows/SzGuiWindowBase.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user