Roguelike
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Friends
Pages
src
menu
menu.h
1
22
#ifndef _MENU_H
23
#define _MENU_H
24
25
#include <iostream>
26
#include <string>
27
#include <vector>
28
#include <ASCII_Lib.h>
29
#include <defs.h>
30
#include <game_states.h>
31
#include <item.h>
32
#include <game.h>
33
#include <character.h>
34
#include <helper.h>
35
36
using namespace
tiledef
;
37
using namespace
std
;
38
44
class
Menu
{
45
public
:
52
Game
*
game
;
53
60
Screen
next_screen
;
61
65
int
selection
;
66
70
string
title
;
71
77
Tile
border
;
78
82
vector<string>
options
;
83
84
89
bool
exit
;
90
96
bool
out_of_bounds(
int
row);
97
102
int
id
;
103
109
Menu
(
int
_padding,
Tile
_border);
110
115
void
move_selection(
int
direction);
116
120
int
padding
;
121
127
vector<string>
extra_lines
;
128
142
virtual
Menu
* make_selection() = 0;
143
148
void
add_item(
string
new_item);
149
153
bool
should_exit();
154
158
int
get_selection();
159
163
void
toggle_exit();
164
168
Screen get_screen();
169
173
int
get_id();
174
178
int
num_extra_lines();
179
183
vector<string> get_extra_lines();
184
};
185
189
class
StartMenu
:
public
Menu
190
{
191
public
:
197
StartMenu
(
int
_padding,
Tile
_border);
198
Menu
* make_selection();
199
200
};
201
205
class
MainMenu
:
public
Menu
206
{
207
public
:
215
MainMenu
(
int
_padding,
Tile
_border,
Game
* _game);
216
Menu
* make_selection();
217
218
219
};
220
226
class
EquipmentMenu
:
public
Menu
227
{
228
public
:
235
EquipmentMenu
(
int
_padding,
Tile
_border,
Game
* _game);
236
Menu
* make_selection();
237
238
239
};
240
246
class
InventoryMenu
:
public
Menu
247
{
248
protected
:
252
vector<Item*>*
items
;
253
public
:
254
/*
255
* Constructor for the Inventory Menu.
256
* @param _padding Sets the padding for the menu.
257
* @param _border Sets the border for the menu.
258
* @param _game Sets the game for the menu.
259
*/
260
InventoryMenu
(
int
_padding,
Tile
_border,
Game
* _game);
261
Menu
* make_selection();
262
263
};
264
269
class
ItemMenu
:
public
Menu
270
{
271
protected
:
275
Item
*
item
;
276
public
:
277
/*
278
* Constructor for the Item Menu.
279
* @param _padding Sets the padding for the menu.
280
* @param _border Sets the border for the menu.
281
* @param _game Sets the game for the menu.
282
* @param _item Sets the item for the menu.
283
*/
284
ItemMenu
(
int
_padding,
Tile
_border,
Game
* _game,
Item
* _item);
285
Menu
* make_selection();
286
287
};
288
293
class
EquipMenu
:
public
Menu
294
{
295
protected
:
299
int
item
;
300
public
:
301
/*
302
* Constructor for the Equip Menu.
303
* @param _padding Sets the padding for the menu.
304
* @param _border Sets the border for the menu.
305
* @param _game Sets the game for the menu.
306
* @param _item Sets the item for the menu.
307
*/
308
EquipMenu
(
int
_padding,
Tile
_border,
Game
* _game,
int
_item);
309
Menu
* make_selection();
310
311
};
312
316
class
EscapeMenu
:
public
Menu
317
{
318
public
:
319
/*
320
* Constructor for the Escape Menu.
321
* @param _padding Sets the padding for the menu.
322
* @param _border Sets the border for the menu.
323
* @param _game Sets the game for the menu.
324
*/
325
EscapeMenu
(
int
_padding,
Tile
_border,
Game
* _game);
326
Menu
* make_selection();
327
328
};
329
335
class
AudioMenu
:
public
Menu
336
{
337
public
:
338
/*
339
* Constructor for the Audio Menu.
340
* @param _padding Sets the padding for the menu.
341
* @param _border Sets the border for the menu.
342
* @param _game Sets the game for the menu.
343
*/
344
AudioMenu
(
int
_padding,
Tile
_border,
Game
* _game);
345
Menu
* make_selection();
346
347
};
348
363
class
FontMenu
:
public
Menu
364
{
365
private
:
369
string
font
;
370
public
:
371
/*
372
* Constructor for the Font Menu.
373
* @param _padding Sets the padding for the menu.
374
* @param _border Sets the border for the menu.
375
* @param _game Sets the game for the menu.
376
*/
377
FontMenu
(
int
_padding,
Tile
_border,
Game
* _game);
378
Menu
* make_selection();
379
383
string
get_font();
384
};
385
390
class
InfoMenu
:
public
Menu
391
{
392
protected
:
396
Item
*
item
;
397
public
:
398
/*
399
* Constructor for the Info Menu.
400
* @param _padding Sets the padding for the menu.
401
* @param _border Sets the border for the menu.
402
* @param _game Sets the game for the menu.
403
* @param _item Sets the item for the menu.
404
*/
405
InfoMenu
(
int
_padding,
Tile
_border,
Game
* _game,
Item
* _item);
406
Menu
* make_selection();
407
};
408
409
#endif
Menu::title
string title
Definition:
menu.h:70
InventoryMenu
Definition:
menu.h:246
MainMenu
Definition:
menu.h:205
AudioMenu
Definition:
menu.h:335
EquipMenu
Definition:
menu.h:293
Menu::border
Tile border
Definition:
menu.h:77
std
EquipMenu::item
int item
Definition:
menu.h:299
Menu::id
int id
Definition:
menu.h:102
EscapeMenu
Definition:
menu.h:316
Menu::selection
int selection
Definition:
menu.h:65
FontMenu::font
string font
Definition:
menu.h:369
Game
Definition:
game.h:49
InventoryMenu::items
vector< Item * > * items
Definition:
menu.h:252
FontMenu
Definition:
menu.h:363
Menu::exit
bool exit
Definition:
menu.h:89
Tile
Definition:
defs.h:66
Item
Definition:
item.h:40
InfoMenu::item
Item * item
Definition:
menu.h:396
ItemMenu
Definition:
menu.h:269
EquipmentMenu
Definition:
menu.h:226
ItemMenu::item
Item * item
Definition:
menu.h:275
Menu
Definition:
menu.h:44
StartMenu
Definition:
menu.h:189
Menu::padding
int padding
Definition:
menu.h:120
Menu::extra_lines
vector< string > extra_lines
Definition:
menu.h:127
Menu::game
Game * game
Definition:
menu.h:52
tiledef
Definition:
defs.cpp:30
Menu::options
vector< string > options
Definition:
menu.h:82
Menu::next_screen
Screen next_screen
Definition:
menu.h:60
InfoMenu
Definition:
menu.h:390
Generated on Thu Dec 18 2014 10:53:46 for Roguelike by
1.8.8