Defines the Game class.

class, images_dir, sounds_dir, ini_dir, options, version, sav_file)

Builds the skool and the cast, and executes the main loop of the game.

  • ini_file – The main Pyskool ini file.
  • images_dir – The path to the images directory.
  • sounds_dir – The path to the sounds directory.
  • ini_dir – The directory to scan for game ini files.
  • options – Options passed from the command line.
  • version (string) – The version number of Pyskool.
  • sav_file – A file from which to restore a saved game.

Start the game and enter the main loop.

class, config, items)

The in-game menu.

  • screen (Screen) – The screen (to draw the menu on).
  • config (dict) – Configuration parameters.
  • items – The menu items ((operation, label) tuples).

Build the title image and menu item images.


Return the operation to perform (which may be None).


Reset the menu. Specifically:

  • set the selected index to 0
  • clear the status text
  • clear the backdrop on which the menu is drawn = 'LOAD'

Menu operation: Load. = 'QUIT'

Menu operation: Quit. = 'RESUME'

Menu operation: Resume. = 'SAVE'

Menu operation: Save. = 'SCALE_DOWN'

Menu operation: Decrease scale. = 'SCALE_UP'

Menu operation: Increase scale. = 'TOGGLE_FULLSCREEN'

Menu operation: Toggle fullscreen mode. = 'UPDATE'

Menu operation: Update the screen.

Previous topic


Next topic