#include <menu.h>
A menu which lists all of the items in the player's inventory. This menu allows the player to intereact with their menu items, and will create a new ItemMenu upon selection.
Menu * InventoryMenu::make_selection |
( |
| ) |
|
|
virtual |
The function that handles when a selection is made in the menu. This is the most important function. There are four possibilities:
- The selection just transitions to a new menu. The menu returned will be the new menu.
- The selection just performs a function and then returns to the same menu. In this case, "this" will be returned and nothing else will happen.
- The selection causes an exit of the menu screen. When this happens, "this" will be returned and should_exit will be toggled. On the next pass, the game_state will then transition to the next_screen.
- The function returns NULL, in which case the game is exited. There's no reason that 2 & 3 can't be combined.
Implements Menu.
vector<Item*>* InventoryMenu::items |
|
protected |
The list of items in the main_character's inventory.
The documentation for this class was generated from the following files:
- src/menu/menu.h
- src/menu/inventory_menu.cpp