started work on border radius

This commit is contained in:
Alessandro Mauri 2024-12-12 15:46:24 +01:00
parent f0aa59ef0b
commit 328cac871a
7 changed files with 61 additions and 22 deletions

View file

@ -34,14 +34,7 @@ fn ElemEvents! Ctx.button(&ctx, String label, Rect size)
}
// Draw the button
Cmd cmd = {
.type = CMD_RECT,
.rect = {
.rect = c_elem.bounds,
.color = bg_color,
},
};
ctx.cmd_queue.enqueue(&cmd)!;
ctx.push_rect(c_elem.bounds, bg_color, do_border: true, do_radius: true)!;
return c_elem.events;
}