mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Made buffer fixed array
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user