class menu

The menu class in the biggest class in GALVADERS project.
This class handles all menu-states as well as screens such as "change controls" or registering user name in high-score table.
The core of the menu class resides in the play_menu() and the play_the_game() methods.
play_menu() is doing the actual display for all menu states (excluding playing a game and game-demo).

Display for all menu-states composed of the following:
1. text_menu_item list.
2. sprite_menu_item list.
3. A "state function" that builds both lists and calls play_menu() to do the display


Thus, we get a simple implementation of all desired menu-states in a simple function and two object lists, The lists are cleared between menu-states.

play_the_game() method is taking care of running the actual game and game-demo.
The difference between the cases is the input source for player object.
When running a game player input is defined as keyboard and for demo mode it would be an appropriate demo-stream.

Check out class menu functions to learn more.