Pause game function added.
This commit is contained in:
parent
8bfe968b4b
commit
3862b36d56
@ -315,6 +315,15 @@ def play_bgm(music_file):
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
def pause_game():
|
||||
"""Pauses the game"""
|
||||
speak("Game paused, press backspace to resume.")
|
||||
while True:
|
||||
event = pygame.event.wait()
|
||||
if event.type == pygame.KEYDOWN and event.key == pygame.K_BACKSPACE: return
|
||||
|
||||
|
||||
|
||||
def get_input(prompt="Enter text:", text=""):
|
||||
"""Display a dialog box for text input.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user