Emergency 20 Dokumentation  4.2.0
IngameMainMenuWindow.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
13 #include <qsf/gui/GuiDocument.h>
14 
15 
16 //[-------------------------------------------------------]
17 //[ Forward declarations ]
18 //[-------------------------------------------------------]
19 namespace em5
20 {
21  class IngameLoadSaveWindow;
22  class IngameExitDialogWindow;
23 }
24 
25 
26 //[-------------------------------------------------------]
27 //[ Namespace ]
28 //[-------------------------------------------------------]
29 namespace em5
30 {
31 
32 
33  //[-------------------------------------------------------]
34  //[ Classes ]
35  //[-------------------------------------------------------]
41  {
42 
43 
44  //[-------------------------------------------------------]
45  //[ Public methods ]
46  //[-------------------------------------------------------]
47  public:
48  explicit IngameMainMenuWindow(qsf::GuiContext& guiContext);
49  virtual ~IngameMainMenuWindow();
50 
51  void setInTutorial(bool inTutorial);
52  void showMenu();
53  void hideMenu();
54  bool menuIsHide();
55 
56  void blockShow(bool blocked);
57 
58 
59  //[-------------------------------------------------------]
60  //[ Public virtual qsf::GuiDocument methods ]
61  //[-------------------------------------------------------]
62  public:
63  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
64 
65 
66  //[-------------------------------------------------------]
67  //[ Private virtual qsf::GuiDocument methods ]
68  //[-------------------------------------------------------]
69  private:
70  virtual bool onPreShow() override;
71  virtual void onPostShow() override;
72  virtual void onPreHide() override;
73 
74 
75  //[-------------------------------------------------------]
76  //[ Private methods ]
77  //[-------------------------------------------------------]
78  private:
79  void setupGui();
80  void onReloadGui();
81  void closeMenu();
82  void restartEvent(bool accepted);
83 
84 
85  //[-------------------------------------------------------]
86  //[ Private data ]
87  //[-------------------------------------------------------]
88  private:
89  IngameLoadSaveWindow* mIngameLoadSaveWindow;
90  IngameExitDialogWindow* mIngameExitDialogWindow;
91  bool mInTutorial;
92  bool mCurrentInputBlockedState;
93  bool mMenuWasClose;
94  bool mBlockShow;
95 
96  Rocket::Core::Element* mIngameMenuElement;
97 
98 
99  };
100 
101 
102 //[-------------------------------------------------------]
103 //[ Namespace ]
104 //[-------------------------------------------------------]
105 } // em5
EMERGENCY 5 in-game main menu window.
Definition: IngameMainMenuWindow.h:40
Definition: ActionPriority.h:13
Graphical User Interface (GUI) document base class.
Definition: GuiDocument.h:51
IngameMainMenuWindow(qsf::GuiContext &guiContext)
void blockShow(bool blocked)
EMERGENCY 5 in-game exit dialog. Exit to windows, main menu and such.
Definition: IngameExitDialogWindow.h:30
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override
void setInTutorial(bool inTutorial)
EMERGENCY 5 ingame load/save window.
Definition: IngameLoadSaveWindow.h:39