renamed elem.rect to elem.bounds

This commit is contained in:
Alessandro Mauri 2024-11-02 09:44:53 +01:00
parent 1cad13e597
commit 8bc38452b3
5 changed files with 36 additions and 36 deletions

View file

@ -18,7 +18,7 @@ fn ElemEvents! Ctx.button(&ctx, String label, Rect size)
// if the element is new or the parent was updated then redo layout
if (c_elem.flags.is_new || parent.flags.updated) {
// 2. Layout
c_elem.rect = ctx.position_element(parent, size, true);
c_elem.bounds = ctx.position_element(parent, size, true);
// TODO: 3. Fill the button specific fields
}
@ -35,7 +35,7 @@ fn ElemEvents! Ctx.button(&ctx, String label, Rect size)
Cmd cmd = {
.type = CMD_RECT,
.rect = {
.rect = c_elem.rect,
.rect = c_elem.bounds,
.color = bg_color,
},
};