Use scissor for pages

This commit is contained in:
dec05eba
2024-08-01 22:41:07 +02:00
parent 10a5669330
commit be0ad41e74
7 changed files with 50 additions and 17 deletions

View File

@@ -28,8 +28,8 @@ namespace gsr {
}
void Button::draw(mgl::Window &window, mgl::vec2f offset) {
mgl::Rectangle background(size);
background.set_position(position + offset);
mgl::Rectangle background(size.floor());
background.set_position((position + offset).floor());
background.set_color(bg_color);
window.draw(background);