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,12 +21,11 @@ def main():
pygame.mouse.set_visible(False)
for keyboard_event in pygame.event.get():
if keyboard_event.type == pygame.QUIT:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
if event.type == pygame.MOUSEBUTTONDOWN:
running = False
if keyboard_event.type == pygame.KEYDOWN:
if keyboard_event.key == pygame.K_ESCAPE:
running = False
rainbow_pos %= 1530
window.fill(rainbow_spectrum(rainbow_pos))