Fixed misbehaving menu.

This commit is contained in:
Storm Dragon 2019-11-26 20:03:25 -05:00
parent 744aba1a32
commit a1a116ee03
2 changed files with 3 additions and 2 deletions

View File

@ -8,6 +8,7 @@ mode = "menu"
sounds = initialize_gui("Numnastics")
def game(mode):
pygame.mixer.music.pause()
i = 0
startTime = time.time()
tries = 0

View File

@ -136,10 +136,10 @@ def game_menu(*options):
if event.key == pygame.K_ESCAPE: exit_game()
if event.key == pygame.K_DOWN and i < len(options) - 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:
i = i - 1
pygame.mixer.music.unpause()
if options[i] != "donate": pygame.mixer.music.unpause()
if event.key == pygame.K_RETURN:
try:
eval(options[i] + "()")