diff --git a/GlitchyEngine/src/Editor/EntityHierarchyWindow.bf b/GlitchyEngine/src/Editor/EntityHierarchyWindow.bf index a957883..b3ac576 100644 --- a/GlitchyEngine/src/Editor/EntityHierarchyWindow.bf +++ b/GlitchyEngine/src/Editor/EntityHierarchyWindow.bf @@ -14,7 +14,7 @@ namespace GlitchyEngine.Editor private Editor _editor; /// Buffer for the entity search string. - private char8[] _entitySearchChars = new char8[64] ~ delete _; + private char8[64] _entitySearchChars; private bool _show = true; @@ -33,6 +33,9 @@ namespace GlitchyEngine.Editor public void Show() { + if(!_show) + return; + if(!ImGui.Begin("Entity Hierarchy", null, .MenuBar)) { ImGui.End(); @@ -112,7 +115,7 @@ namespace GlitchyEngine.Editor ImGui.Text("Search:"); - ImGui.InputText(String.Empty, _entitySearchChars.Ptr, (.)_entitySearchChars.Count); + ImGui.InputText(String.Empty, &_entitySearchChars, (.)_entitySearchChars.Count); ImGui.EndMenuBar(); } @@ -130,7 +133,7 @@ namespace GlitchyEngine.Editor } else { - name = scope:: $"Entity {((uint64)tree.Value.[Friend]Index)}"; + name = scope:: $"Entity {(tree.Value.[Friend]Index)}"; } ImGui.TreeNodeFlags flags = .OpenOnArrow; @@ -231,7 +234,7 @@ namespace GlitchyEngine.Editor private void ShowEntityHierarchy() { - StringView searchString = StringView(_entitySearchChars.Ptr); + StringView searchString = StringView(&_entitySearchChars); if(searchString.Length == 0) { diff --git a/Sandbox/src/SandboxApp.bf b/Sandbox/src/SandboxApp.bf index 62270f8..d79bc36 100644 --- a/Sandbox/src/SandboxApp.bf +++ b/Sandbox/src/SandboxApp.bf @@ -545,23 +545,7 @@ namespace Sandbox private bool OnImGuiRender(ImGuiRenderEvent e) { _editor.Update(); - - ImGui.Begin("Animation"); /* - if(AnimationPlayer != null) - { - ImGui.DragFloat("Timestamp", &AnimationPlayer.TimeStamp, 0.01f, -AnimationPlayer.CurrentClip.Duration, AnimationPlayer.CurrentClip.Duration); - - while(AnimationPlayer.TimeStamp < 0) - { - AnimationPlayer.TimeStamp += AnimationPlayer.CurrentClip.Duration; - } - - ImGui.Checkbox("Play", &playAnimation); - } - */ - ImGui.End(); - ImGui.Begin("Test"); var v = ImGui.ColorEdit3("Square Color", ref _squareColor0); @@ -573,7 +557,7 @@ namespace Sandbox } ImGui.End(); - + */ return false; }