mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Improved Editor
- Added window docking - Added MenuBar - Added scene viewport - Added closing and reopening for editor windows
This commit is contained in:
@@ -12,19 +12,21 @@ namespace GlitchyEditor.EditWindows
|
||||
/// A window for viewing and editing the scene hierarchy
|
||||
class EntityHierarchyWindow
|
||||
{
|
||||
public const String s_WindowTitle = "Entity Hierarchy";
|
||||
|
||||
private Editor _editor;
|
||||
|
||||
/// Buffer for the entity search string.
|
||||
private char8[64] _entitySearchChars;
|
||||
|
||||
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)
|
||||
@@ -34,10 +36,10 @@ namespace GlitchyEditor.EditWindows
|
||||
|
||||
public void Show()
|
||||
{
|
||||
if(!_show)
|
||||
if(!_open)
|
||||
return;
|
||||
|
||||
if(!ImGui.Begin("Entity Hierarchy", null, .MenuBar))
|
||||
if(!ImGui.Begin(s_WindowTitle, &_open, .MenuBar))
|
||||
{
|
||||
ImGui.End();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user