| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
#ifndef MENUMANAGER_H |
| 8 |
#define MENUMANAGER_H |
| 9 |
|
| 10 |
class Main; |
| 11 |
|
| 12 |
class ControlOptions; |
| 13 |
class VideoOptions; |
| 14 |
class GameOptions; |
| 15 |
|
| 16 |
class MenuSystem; |
| •17 |
#include "ui/menuaction.h" |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
class MenuManager |
| 30 |
{ |
| 31 |
Main &main; |
| 32 |
|
| 33 |
ControlOptions *controlOptions; |
| 34 |
VideoOptions *videoOptions; |
| 35 |
GameOptions *gameOptions; |
| 36 |
|
| 37 |
MenuSystem *menuSystem; |
| 38 |
|
| 39 |
public: |
| 40 |
MenuManager(Main &); |
| 41 |
|
| 42 |
~MenuManager(); |
| 43 |
|
| 44 |
void showSinglePlayerMenu(); |
| 45 |
void show(); |
| 46 |
void hide(); |
| 47 |
bool isVisible() const; |
| 48 |
|
| 49 |
void resize(); |
| 50 |
|
| 51 |
void render(); |
| 52 |
|
| 53 |
bool update(); |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
void senseFinished(bool); |
| 64 |
|
| 65 |
GameOptions &getGameOptions() const { return *gameOptions; }; |
| 66 |
|
| 67 |
VideoOptions &getVideoOptions() const { return *videoOptions; }; |
| 68 |
}; |
| 69 |
|
| •70 |
class QuitAction : public MenuAction |
| 71 |
{ |
| 72 |
Main &main; |
| 73 |
|
| 74 |
public: |
| 75 |
QuitAction(Main &newMain) |
| 76 |
: main(newMain) { } |
| 77 |
|
| 78 |
void invoke(); |
| 79 |
}; |
| 80 |
|
| 81 |
#endif |