Here's a quick guide to making a custom pause screen appear, from where players can choose to proceed to save, load preferences, and any other screen you want them to access.
The following defines your pause menu:
Code: Select all
screen game_menu:
tag menu
vbox:
pos (0.5, 0.5)
anchor (0.5, 0.5)
textbutton _("Continue") action Return()
textbutton _("Save Game") action ShowMenu("save")
textbutton _("Load Game") action ShowMenu("load")
textbutton _("Preferences") action ShowMenu("preferences")
textbutton _("Main Menu") action MainMenu()
textbutton _("Help") action Help()
textbutton _("Quit") action Quit()You can replace your textbuttons with imagebuttons, or use an imagemap, to customize the appearance.
Now, all you need to do, is tell your game this is the screen you want to appear on ESC or right-click.
Make sure to put this code at the beginning of your game (after the start label):
Code: Select all
$ _game_menu_screen = "game_menu"If there's a scene where you want your players to be unable to pause the game, you can do the following:
Code: Select all
$ _game_menu_screen = None
#your scene here
$ _game_menu_screen = "game_menu"For example, during an ATL-based cutscene.




