diff --git a/examples/gui.py b/examples/gui.py index 099b48a..4d38b28 100644 --- a/examples/gui.py +++ b/examples/gui.py @@ -82,7 +82,7 @@ class ExampleMenu(Page): i = 0 for button in buttons: - if x + button.surface.get_width() > self.app.screen.get_width(): + if x + button.image.get_width() > self.app.screen.get_width(): x = start_pos[0] y += button.surface.get_height() + spacing @@ -98,7 +98,7 @@ class ExampleMenu(Page): buttons[i] = button - x += button.surface.get_width() + spacing + x += button.image.get_width() + spacing i += 1