Fixed misbehaving menu.
This commit is contained in:
parent
744aba1a32
commit
a1a116ee03
@ -8,6 +8,7 @@ mode = "menu"
|
|||||||
sounds = initialize_gui("Numnastics")
|
sounds = initialize_gui("Numnastics")
|
||||||
|
|
||||||
def game(mode):
|
def game(mode):
|
||||||
|
pygame.mixer.music.pause()
|
||||||
i = 0
|
i = 0
|
||||||
startTime = time.time()
|
startTime = time.time()
|
||||||
tries = 0
|
tries = 0
|
||||||
|
@ -136,10 +136,10 @@ def game_menu(*options):
|
|||||||
if event.key == pygame.K_ESCAPE: exit_game()
|
if event.key == pygame.K_ESCAPE: exit_game()
|
||||||
if event.key == pygame.K_DOWN and i < len(options) - 1:
|
if event.key == pygame.K_DOWN and i < len(options) - 1:
|
||||||
i = i + 1
|
i = i + 1
|
||||||
pygame.mixer.music.unpause()
|
if options[i] != "donate": pygame.mixer.music.unpause()
|
||||||
if event.key == pygame.K_UP and i > 0:
|
if event.key == pygame.K_UP and i > 0:
|
||||||
i = i - 1
|
i = i - 1
|
||||||
pygame.mixer.music.unpause()
|
if options[i] != "donate": pygame.mixer.music.unpause()
|
||||||
if event.key == pygame.K_RETURN:
|
if event.key == pygame.K_RETURN:
|
||||||
try:
|
try:
|
||||||
eval(options[i] + "()")
|
eval(options[i] + "()")
|
||||||
|
Loading…
Reference in New Issue
Block a user