From 1358683331c7d0395f525cd01a5360b192df6384 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 14 Sep 2025 17:44:59 +1000 Subject: [PATCH] fix bug --- src/editor/editor.d | 9 +++++++++ src/editor/ui.d | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/editor/editor.d b/src/editor/editor.d index 737048f..be821db 100644 --- a/src/editor/editor.d +++ b/src/editor/editor.d @@ -47,6 +47,15 @@ Cycle(Inputs* inputs) BeginBuild(inputs); + static UIPanel panel = { + id: CastStr!(u8)("##base"), + axis: A2D.Y, + pct: 1.0, + }; + + Panel(&panel); + EndPanel(); + EndBuild(); } diff --git a/src/editor/ui.d b/src/editor/ui.d index 7d21f2a..7e9237a 100644 --- a/src/editor/ui.d +++ b/src/editor/ui.d @@ -561,7 +561,7 @@ EndBuild() PopSiblingPanels(); assert(ctx.prev_sibling == g_UI_NIL_NODE); - assert(ctx.top_parent == g_UI_NIL_NODE); + assert(ctx.top_parent == g_UI_NIL_NODE, "Parent panel not popped"); CalcFixedSizes(ctx.root); CalcPercentageSizes(ctx.root); @@ -569,10 +569,10 @@ EndBuild() { CalcPositions!(axis)(ctx.root); } - DrawUI(ctx, ctx.root); - PrepRendering(ctx); + DrawUI(ctx, ctx.root); + BindBuffers(&ctx.rd, &ctx.buffers[ctx.f_idx].m_idx, &ctx.buffers[ctx.f_idx].m_vtx); DrawIndexed(&ctx.rd, 6, ctx.buffers[ctx.f_idx].count, 0);