This commit is contained in:
Matthew 2025-09-14 17:44:59 +10:00
parent 439aa2b526
commit 1358683331
2 changed files with 12 additions and 3 deletions

View File

@ -47,6 +47,15 @@ Cycle(Inputs* inputs)
BeginBuild(inputs); BeginBuild(inputs);
static UIPanel panel = {
id: CastStr!(u8)("##base"),
axis: A2D.Y,
pct: 1.0,
};
Panel(&panel);
EndPanel();
EndBuild(); EndBuild();
} }

View File

@ -561,7 +561,7 @@ EndBuild()
PopSiblingPanels(); PopSiblingPanels();
assert(ctx.prev_sibling == g_UI_NIL_NODE); 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); CalcFixedSizes(ctx.root);
CalcPercentageSizes(ctx.root); CalcPercentageSizes(ctx.root);
@ -569,10 +569,10 @@ EndBuild()
{ {
CalcPositions!(axis)(ctx.root); CalcPositions!(axis)(ctx.root);
} }
DrawUI(ctx, ctx.root);
PrepRendering(ctx); PrepRendering(ctx);
DrawUI(ctx, ctx.root);
BindBuffers(&ctx.rd, &ctx.buffers[ctx.f_idx].m_idx, &ctx.buffers[ctx.f_idx].m_vtx); 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); DrawIndexed(&ctx.rd, 6, ctx.buffers[ctx.f_idx].count, 0);