Skip to content

Commit 9ccee12

Browse files
committed
Code cleanup
1 parent 05a1546 commit 9ccee12

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Gravitator/ui/surface.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,13 @@ def handleEvents(event: pygame.event.Event) -> bool:
3434

3535
event_handled = False
3636

37-
# Handle events for all widgets
37+
# Handle events for all widgets & surfaces
3838
for surface in Surface.instances:
3939
for widget in surface.widgets:
4040
if widget.handleEvents(event):
4141
event_handled = True
4242
if pygame.Rect(surface.topleft.combineToList(surface.size)).collidepoint(pygame.mouse.get_pos()) and Surface.CAN_CLICK_THROUGH:
4343
event_handled = True
44-
4544
return event_handled
4645

4746

@@ -50,10 +49,7 @@ def draw(self):
5049
Draw all widgets and the surface
5150
'''
5251

53-
# draw the background rect
5452
self.fill(self.bg_color)
55-
56-
# draw all widgets
5753
for widget in self.widgets:
5854
widget.draw()
5955

0 commit comments

Comments
 (0)