Pause game function added.
This commit is contained in:
		@@ -315,6 +315,15 @@ def play_bgm(music_file):
 | 
				
			|||||||
    except Exception as e:
 | 
					    except Exception as e:
 | 
				
			||||||
        pass
 | 
					        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=""):
 | 
					def get_input(prompt="Enter text:", text=""):
 | 
				
			||||||
    """Display a dialog box for text input.
 | 
					    """Display a dialog box for text input.
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user