Improved Editor

- Added window docking
- Added MenuBar
- Added scene viewport
- Added closing and reopening for editor windows
This commit is contained in:
Simon Lübeß
2021-09-17 13:05:15 +02:00
parent 45d298b755
commit 0b1ec9a837
5 changed files with 260 additions and 18 deletions
@@ -7,16 +7,18 @@ namespace GlitchyEditor.EditWindows
{
class ComponentEditWindow
{
public const String s_WindowTitle = "Components";
private Editor _editor;
private bool _show = true;
private bool _open = true;
public Editor Editor => _editor;
public bool Show
public bool Open
{
get => _show;
set => _show = value;
get => _open;
set => _open = value;
}
public this(Editor editor)
@@ -26,10 +28,10 @@ namespace GlitchyEditor.EditWindows
public void Show()
{
if(!_show)
if(!_open)
return;
if(!ImGui.Begin("Components"))
if(!ImGui.Begin(s_WindowTitle, &_open, .None))
{
ImGui.End();
return;