Emergency 20 Dokumentation  4.2.0
EmergencyGui.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 "em5/Export.h"
14 
16 
17 #include <string>
18 
19 
20 //[-------------------------------------------------------]
21 //[ Forward declarations ]
22 //[-------------------------------------------------------]
23 namespace qsf
24 {
25  class RenderWindow;
26  class GuiContext;
27 }
28 namespace em5
29 {
30  class MainMenuManager;
31  class StartMenuManager;
32  class IngameHud;
33  class GenericDebugGui;
34  class LogoScreen;
35  class LoadingScreen;
36  class DatagridPictureFormatter;
37  class DatagridCheckboxFormatter;
38  class ExpandButtonFormatter;
39  class ButtonFormatter;
40  class ImageFormatter;
41  class LoadCampaignFormatter;
42  class BuyUpgradeTitleAndCostFormatter;
43  class BuyUpgradeIconFormatter;
44  class UpDownFormatter;
45  class MultiplayerWindowNameFormatter;
46  class MultiplayerWindowLockFormatter;
47  class AchievementIconFormatter;
48  class AchievementNameFormatter;
49  class AchievementDescriptionFormatter;
50  class AchievementPointsFormatter;
51  class TitleNameFormatter;
52  class TitleIconFormatter;
53  class Tooltip;
54  class ToolTipManager;
55  class MessageBox;
56  class ContentAuthenticationWindow;
57  class CloudSynchronisationWindow;
58  class MouseCursorManager;
59  class PatchUpdateProgressDialog;
60 }
61 namespace Rocket
62 {
63  namespace Core
64  {
65  class ElementDocument;
66  }
67 }
68 
69 
70 //[-------------------------------------------------------]
71 //[ Namespace ]
72 //[-------------------------------------------------------]
73 namespace em5
74 {
75 
76 
77  //[-------------------------------------------------------]
78  //[ Classes ]
79  //[-------------------------------------------------------]
84  class EM5_API_EXPORT EmergencyGui : public qsf::UniqueInstance<EmergencyGui>
85  {
86 
87 
88  //[-------------------------------------------------------]
89  //[ Public methods ]
90  //[-------------------------------------------------------]
91  public:
99  explicit EmergencyGui(qsf::RenderWindow& renderWindow);
100 
105  virtual ~EmergencyGui();
106 
111  void startupMenus();
112 
123  void startupGenericDebugGui(const std::string& guiDocumentName);
124 
129  void showLogoScreen();
130 
138  void showMainMenu();
139 
147  void hideMainMenu();
148 
153  void showStartMenu(bool installed = true);
154 
159  void hideStartMenu();
160 
168  LoadingScreen& getLoadingScreen();
169 
174  bool isLoadingScreenVisible() const;
175 
180  void showLoadingScreen();
181 
186  void hideLoadingScreen();
187 
192  void showIngameHud();
193 
198  void hideIngameHud();
199 
204  void hideTooltip();
205 
210  void showTooltip();
211 
219  inline qsf::GuiContext& getGuiContext() const;
220 
228  MainMenuManager& getMainMenuManager();
229 
237  inline StartMenuManager& getStartMenuManager() const;
238 
246  inline IngameHud& getIngameHud() const;
247  inline IngameHud* tryGetIngameHud() const;
248 
253  inline PatchUpdateProgressDialog& getPatchUpdateProgressDialog() const;
254 
259  void showMouseCursor(bool show);
260 
265  void setMouseCursor(const std::string& cursorName);
266 
271  void resetMouseCursor();
272 
277  void showModalMessageBox(const std::string& title, const std::string& text, const std::string& buttonTrueText, const std::string& buttonFalseText, const boost::function<void(bool)>& callback);
278 
283  void showModalMessageBox(const std::string& title, const std::string& text, const std::string& buttonTrueText, const std::string& buttonFalseText, float autoFalseTime, const boost::function<void(bool)>& callback);
284 
289  void showModalMessageBox(const std::string& title, const std::string& text, const std::string& buttonText, const boost::function<void(bool)>& callback);
290 
295  void showModalMessageBox(const std::string& title, const std::string& text, const std::string& buttonText);
296 
301  void abortModalMessageBox();
302 
303  void setContentAuthenticationWindowVisible(bool visible) const;
304  void setCloudSynchronisationWindowVisible(bool visible) const;
305 
310  void showPatchUpdateProgressDialog();
311 
312  inline ToolTipManager& getToolTipManager() const;
313 
314 
315  //[-------------------------------------------------------]
316  //[ Private methods ]
317  //[-------------------------------------------------------]
318  private:
319  void onViewportDimensionsChanged(int width, int height);
320 
321 
322  //[-------------------------------------------------------]
323  //[ Private data ]
324  //[-------------------------------------------------------]
325  private:
326  qsf::GuiContext* mGuiContext;
327  boost::signals2::scoped_connection mViewportDimensionChangedConnection;
328 
329  MainMenuManager* mMainMenuManager;
330  StartMenuManager* mStartMenuManager;
331  IngameHud* mIngameHud;
332 
333  LogoScreen* mLogoScreen;
334  LoadingScreen* mLoadingScreen;
335 
336  ExpandButtonFormatter* mExpandButtonFormatter;
337  ButtonFormatter* mButtonFormatter;
338  ImageFormatter* mImageFormatter;
339  LoadCampaignFormatter* mLoadCampaignFormatter;
340  MultiplayerWindowNameFormatter* mMultiplayerWindowNameFormatter;
341  MultiplayerWindowLockFormatter* mMultiplayerWindowLockFormatter;
342  AchievementIconFormatter* mAchievementIconFormatter;
343  AchievementNameFormatter* mAchievementNameFormatter;
344  AchievementDescriptionFormatter* mAchievementDescriptionFormatter;
345  AchievementPointsFormatter* mAchievementPointsFormatter;
346  TitleNameFormatter* mTitleNameFormatter;
347  TitleIconFormatter* mTitleIconFormatter;
348  UpDownFormatter* mUpDownFormatter;
349  BuyUpgradeIconFormatter* mBuyUpgradeIconFormatter;
350  BuyUpgradeTitleAndCostFormatter* mBuyUpgradeTitleAndCostFormatter;
351  PatchUpdateProgressDialog* mPatchUpdateProgressDialog;
352 
353  ToolTipManager* mToolTipManager;
354  MessageBox* mMessageBox;
355  ContentAuthenticationWindow* mContentAuthenticationWindow;
356  CloudSynchronisationWindow* mCloudSynchronisationWindow;
357 
358  // libRocket data formatter for tables (e.g. modification window)
359  DatagridPictureFormatter* mDatagridPictureFormatter;
360  DatagridCheckboxFormatter* mDatagridCheckboxFormatter;
361 
362  // Generic debug UI
363  GenericDebugGui* mGenericDebugGui;
364 
365  MouseCursorManager* mMouseCursorManager;
366 
367 
368  };
369 
370 
371 //[-------------------------------------------------------]
372 //[ Namespace ]
373 //[-------------------------------------------------------]
374 } // em5
375 
376 
377 //[-------------------------------------------------------]
378 //[ Implementation ]
379 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Librocket button formatter.
Definition: ButtonFormatter.h:33
Multiplayer window lock formatter.
Definition: MultiplayerWindowLockFormatter.h:30
EMERGENCY 5 start menu manager.
Definition: StartMenuManager.h:46
EMERGENCY 5 in-game HUD.
Definition: IngameHud.h:105
Librocket image formatter.
Definition: ImageFormatter.h:30
#define EM5_API_EXPORT
Definition: Export.h:28
Achievement name formatter.
Definition: AchievementNameFormatter.h:30
Definition: ContentAuthenticationWindow.h:26
Librocket datagrid data formatter.
Definition: ExpandButtonFormatter.h:33
Definition: OverlayComponent.h:29
Achievement description formatter.
Definition: AchievementDescriptionFormatter.h:30
EMERGENCY 5 Main menu manager.
Definition: MainMenuManager.h:71
Definition: PickupPersonByParamedicAction.h:21
Message box GUI element class.
Definition: MessageBox.h:47
void MessageBox(const std::string &title, const std::string &msg, const std::string &defaultButton)
Show an alter popup (like MessageBox on Windows)
Achievement icon formatter.
Definition: AchievementIconFormatter.h:30
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
Unique instance interface.
Definition: UniqueInstance.h:34
Patch update pregress dialog GUI window.
Definition: PatchUpdateProgressDialog.h:47
Title icon formatter.
Definition: TitleIconFormatter.h:30
EMERGENCY 5 GUI instance to handle the game-specific user interface.
Definition: EmergencyGui.h:84
EMERGENCY 5 generic GUI instance for user interface development.
Definition: GenericDebugGui.h:46
Achievement points formatter.
Definition: AchievementPointsFormatter.h:30
Definition: CloudSynchronisationWindow.h:26
Title name formatter.
Definition: TitleNameFormatter.h:30
Librocket modification up down button formatter.
Definition: UpDownFormatter.h:33
Librocket Buy-/Upgrade formatter for the icon.
Definition: BuyUpgradeIconFormatter.h:33
Load campaign formatter.
Definition: LoadCampaignFormatter.h:30
Multiplayer window name formatter.
Definition: MultiplayerWindowNameFormatter.h:30
Loading screen GUI window.
Definition: LoadingScreen.h:43
Librocket datagrid data formatter.
Definition: DatagridCheckboxFormatter.h:33
EMERGENCY 5 logo screen.
Definition: LogoScreen.h:42
Librocket Buy-/Upgrade formatter for the Title and Cost column.
Definition: BuyUpgradeTitleAndCostFormatter.h:33
EMERGENCY 5 tooltip manager class.
Definition: ToolTipManager.h:53
Render window class, encapsulates "Ogre::RenderWindow".
Definition: RenderWindow.h:53
Librocket datagrid data formatter.
Definition: DatagridPictureFormatter.h:30
Manager for handling mouse cursors via libRocket.
Definition: MouseCursorManager.h:48