Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
| 1 |
// menumanager.h |
| 2 |
// |
| 3 |
// (c) Robert Schuster, 2007 |
| 4 |
// |
| 5 |
// Licensed under GNU GPL version 2 or, at your option, any later version. |
| 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 |
|
| 18 |
/** |
| 19 |
* MenuManager forms the facade for interacting with the game's menus. |
| 20 |
* |
| 21 |
* It speaks to MenuSystem and builds up the menus and their menu entries. However |
| 22 |
* it does not touch any of the guichan internal. |
| 23 |
* |
| 24 |
* This is done to keep the guichan integration low and give the menu |
| 25 |
* construction a dedicated place that is not polluted with low-level stuff. |
| 26 |
* |
| 27 |
*/ |
| 28 |
class MenuManager |
| 29 |
{ |
| 30 |
Main &main; |
| 31 |
|
| 32 |
ControlOptions *controlOptions; |
| 33 |
VideoOptions *videoOptions; |
| 34 |
GameOptions *gameOptions; |
| 35 |
|
| 36 |
MenuSystem *menuSystem; |
| 37 |
|
| 38 |
public: |
| 39 |
MenuManager(Main &); |
| 40 |
|
| 41 |
~MenuManager(); |
| 42 |
|
| 43 |
void showSinglePlayerMenu(); |
| 44 |
void show(); |
| 45 |
void hide(); |
| 46 |
bool isVisible() const; |
| 47 |
|
| 48 |
void resize(); |
| 49 |
|
| 50 |
void render(); |
| 51 |
|
| 52 |
bool update(); |
| 53 |
|
| 54 |
/** Indicate that input sensing should be finished. |
| 55 |
* |
| 56 |
* If a new input has been determined and the operation should |
| 57 |
* end as succeeded the argument's value is <code>true</code>. |
| 58 |
* |
| 59 |
* If the operation should end as cancelled the argument's value |
| 60 |
* is <code>false</code>. |
| 61 |
* */ |
| 62 |
void senseFinished(bool); |
| 63 |
|
| 64 |
GameOptions &getGameOptions() const { return *gameOptions; }; |
| 65 |
|
| 66 |
VideoOptions &getVideoOptions() const { return *videoOptions; }; |
| 67 |
}; |
| 68 |
|
| 69 |
class QuitAction : public MenuAction |
| 70 |
{ |
| 71 |
Main &main; |
| 72 |
|
| 73 |
public: |
| 74 |
QuitAction(Main &newMain) |
| 75 |
: main(newMain) { } |
| 76 |
|
| 77 |
void invoke(); |
| 78 |
}; |
| 79 |
|
| 80 |
#endif |