class main_commands.MainCommandScreen(CommandScreen)

MainCommandScreen is a subclass of CommandScreen that provides the following menu commands:

TitleAction NameKeysRemarks
HelpaboutCmd-H, F1
New Gamenew_gameCmd-N
Load Game...load_gameCmd-O
Save Gamesave_gameCmd-S
Save Game As...save_game_as
Continueresume_gameESC
Restart Levelrestart_levelCmd-R
Custom Levelsopen_level_editorCmd-K
Level Editorenter_level_editorCmd-EOnly shown when game has a level editor
QuitquitCmd-Q

You may want to base your playing screen on MainCommandScreen, so that it will respond to the keyboard equivalents of these commands.

Class Attributes

title_class = MainMenuTitle
Widget class for the menu title. Should be a subclass of Label or something with a compatible constructor.
button_class = MainMenuButton
Widget class for the menu buttons. Should be a subclass of Button or something with a compatible constructor.

Class Attributes

title_class = MainMenuTitle
Widget class for the menu title. Should be a subclass of Label or something with a compatible constructor.
button_class = MainMenuButton
Widget class for the menu buttons. Should be a subclass of Button or something with a compatible constructor.

Class Attributes

title_class = MainMenuTitle
Widget class for the menu title. Should be a subclass of Label or something with a compatible constructor.
button_class = MainMenuButton
Widget class for the menu buttons. Should be a subclass of Button or something with a compatible constructor.

Properties

title
Title string for a menu. You can customize this by overriding the get_title() method.

Methods

get_title()
Returns the title to be used when displaying a menu. The default implementation returns the value of the Shell's game_title attribute.

Themable Classes

You can customize the appearance of the title and menu by providing Albow themes for the following classes defined in the the main_commands module.
class MainMenuTitle(MenuTitle)
Default class for the menu title.
class MainMenuButton(MenuButton)
Default class for the menu buttons.
---