change quit from esc to click

This commit is contained in:
Nicholas Dyer 2023-02-19 14:39:25 -05:00
parent 48d1736bcf
commit df02992225

View File

@ -21,11 +21,10 @@ def main():
pygame.mouse.set_visible(False) pygame.mouse.set_visible(False)
for keyboard_event in pygame.event.get(): for event in pygame.event.get():
if keyboard_event.type == pygame.QUIT: if event.type == pygame.QUIT:
running = False running = False
if keyboard_event.type == pygame.KEYDOWN: if event.type == pygame.MOUSEBUTTONDOWN:
if keyboard_event.key == pygame.K_ESCAPE:
running = False running = False
rainbow_pos %= 1530 rainbow_pos %= 1530