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);