idk some stuff
This commit is contained in:
parent
c1a7b4fcdb
commit
c0e9565bf6
12 changed files with 131 additions and 81 deletions
|
|
@ -135,7 +135,8 @@ fn void! Ctx.push_string(&ctx, Rect bounds, String text)
|
|||
.w = gp.w,
|
||||
.h = gp.h,
|
||||
};
|
||||
if (rect_collision(gb, bounds)) {
|
||||
// push the sprite only if it collides with the bounds
|
||||
if (gb.collides(bounds)) {
|
||||
ctx.push_sprite(gb, gt, texture_id)!;
|
||||
}
|
||||
line_len += gp.adv;
|
||||
|
|
@ -173,4 +174,4 @@ fn void! Ctx.push_scissor(&ctx, Rect rect)
|
|||
.scissor.rect = rect,
|
||||
};
|
||||
ctx.cmd_queue.enqueue(&sc)!;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue