change quit from esc to click
This commit is contained in:
parent
48d1736bcf
commit
df02992225
@ -21,12 +21,11 @@ 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
|
||||||
|
if event.type == pygame.MOUSEBUTTONDOWN:
|
||||||
running = False
|
running = False
|
||||||
if keyboard_event.type == pygame.KEYDOWN:
|
|
||||||
if keyboard_event.key == pygame.K_ESCAPE:
|
|
||||||
running = False
|
|
||||||
|
|
||||||
rainbow_pos %= 1530
|
rainbow_pos %= 1530
|
||||||
window.fill(rainbow_spectrum(rainbow_pos))
|
window.fill(rainbow_spectrum(rainbow_pos))
|
||||||
|
Loading…
Reference in New Issue
Block a user