Emergency 20 Dokumentation  4.2.0
MainMenuManager.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 <boost/noncopyable.hpp>
14 
15 #include "em5/Export.h"
16 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23  class MainMenu;
24  class BaseLayer;
25  class AccountStatus;
26  class LoadCampaign;
27  class AccountStatusTitle;
28  class AccountInfo;
29  class AchievementsWindow;
30  class StartGame;
31  class CreditsWindow;
32  class StartCampaign;
33  class SelectCampaign;
34  class SelectDifficultyWindow;
35  class FreeplayWindow;
36  class MainEventWindow;
37  class MultiplayerWindow;
38  class MultiplayerDirectConnectWindow;
39  class MultiplayerCreateServerWindow;
40  class MultiplayerLobbyWindow;
41  class MultiplayerHelpWindow;
42  class PreferencesGameWindow;
43  class PreferencesGraphicWindow;
44  class ExtendedPreferencesGraphicWindow;
45  class PreferencesAudioWindow;
46  class InputWindow;
47  class AccountStatusTitleDataSource;
48  class AchievementsWindowDataSource;
49  class LoadCampaignDataSource;
50  class MainEventDataSource;
51  class EndlessGameDataSource;
52  class MultiplayerServerDataSource;
53  class VideoPlayerWindow;
54 }
55 
56 
57 //[-------------------------------------------------------]
58 //[ Namespace ]
59 //[-------------------------------------------------------]
60 namespace em5
61 {
62 
63 
64  //[-------------------------------------------------------]
65  //[ Classes ]
66  //[-------------------------------------------------------]
71  class EM5_API_EXPORT MainMenuManager : public boost::noncopyable
72  {
73 
74 
75  //[-------------------------------------------------------]
76  //[ Public definitions ]
77  //[-------------------------------------------------------]
78  public:
79  enum class ScreenToShow
80  {
81  DEFAULT,
82  CREDITS,
83  MAINEVENTS,
84  SELECTCAMPAIGN
85  };
86 
87 
88  //[-------------------------------------------------------]
89  //[ Public methods ]
90  //[-------------------------------------------------------]
91  public:
97 
105  ~MainMenuManager();
106 
111  void loadGui();
112 
117  void hideGui();
118 
123  void destroyGui();
124 
129  void setScreenToShowOnReturn(ScreenToShow screenToShow);
130 
131  void showAccountInfoWindow(bool show);
132 
140  MainMenu& getMainMenuWindow();
141 
149  BaseLayer& getBaseLayer();
150 
158  AccountStatus& getAccountStatusWindow();
159 
167  AccountStatusTitle& getAccountStatusTitleWindow();
168 
176  AchievementsWindow& getAchievementsWindow();
177 
185  StartGame& getStartGameWindow();
186 
194  CreditsWindow& getCreditsWindow();
195 
203  StartCampaign& getStartCampaignWindow();
204 
212  SelectCampaign& getSelectCampaignWindow();
213 
221  SelectDifficultyWindow& getSelectDifficultyWindow();
222 
230  FreeplayWindow& getFreeplayWindow();
231 
239  MainEventWindow& getMainEventWindow();
240 
248  MultiplayerWindow& getMultiplayerWindow();
249 
257  MultiplayerCreateServerWindow& getMultiplayerCreateServerWindow();
258 
266  MultiplayerLobbyWindow& getMultiplayerLobbyWindow();
267 
275  MultiplayerDirectConnectWindow& getMultiplayerDirectConnectWindow();
276 
284  MultiplayerHelpWindow& getMultiplayerHelpWindow();
285 
293  PreferencesGameWindow& getPreferencesGameWindow();
294  PreferencesGraphicWindow& getPreferencesGraphicWindow();
295  ExtendedPreferencesGraphicWindow& getExtendedPreferencesGraphicWindow();
296  PreferencesAudioWindow& getPreferencesAudioWindow();
297 
305  InputWindow& getInputWindow();
306 
314  VideoPlayerWindow& getVideoPlayerWindow();
315 
316  // TODO(sw) Why are the datasources accessible/created here? Normally they should be only needed by one document
317  // -> Move them to the using document class if possible (when only used there)
318 
326  AccountStatusTitleDataSource& getAccountStatusTitleDataSource();
327 
335  AchievementsWindowDataSource& getAchievementsWindowDataSource();
336 
344  LoadCampaignDataSource& getLoadCampaignDataSource();
345 
353  MainEventDataSource& getMainEventDataSource();
354 
362  EndlessGameDataSource& getEndlessGameDataSource();
363 
371  MultiplayerServerDataSource& getMultiplayerServerDataSource();
372 
373 
374  //[-------------------------------------------------------]
375  //[ Private methods ]
376  //[-------------------------------------------------------]
377  private:
378  void updateAccountStatus();
379 
380 
381  //[-------------------------------------------------------]
382  //[ Private data ]
383  //[-------------------------------------------------------]
384  private:
385  MainMenu* mMainMenuWindow;
386  BaseLayer* mBaseLayer;
387  AccountStatus* mAccountStatusWindow;
388  AccountStatusTitle* mAccountStatusTitleWindow;
389  AccountInfo* mAccountInfoWindow;
390  AchievementsWindow* mAchievementsWindow;
391  StartGame* mStartGameWindow;
392  CreditsWindow* mCreditsWindow;
393  StartCampaign* mStartCampaignWindow;
394  SelectCampaign* mSelectCampaignWindow;
395  SelectDifficultyWindow* mSelectDifficultyWindow;
396  FreeplayWindow* mFreeplayWindow;
397  MainEventWindow* mMainEventWindow;
398  MultiplayerWindow* mMultiplayerWindow;
399  MultiplayerCreateServerWindow* mMultiplayerCreateServerWindow;
400  MultiplayerLobbyWindow* mMultiplayerLobbyWindow;
401  MultiplayerHelpWindow* mMultiplayerHelpWindow;
402  MultiplayerDirectConnectWindow* mMultiplayerDirectConnectWindow;
403  PreferencesGameWindow* mPreferencesGameWindow;
404  PreferencesGraphicWindow* mPreferencesGraphicWindow;
405  ExtendedPreferencesGraphicWindow* mExtendedPreferencesGraphicWindow;
406  PreferencesAudioWindow* mPreferencesAudioWindow;
407  InputWindow* mInputWindow;
408  VideoPlayerWindow* mVideoPlayerWindow;
409 
410  AccountStatusTitleDataSource* mAccountStatusTitleDataSource;
411  AchievementsWindowDataSource* mAchievementsWindowDataSource;
412  LoadCampaignDataSource* mLoadCampaignDataSource;
413  MainEventDataSource* mMainEventDataSource;
414  EndlessGameDataSource* mEndlessGameDataSource;
415  MultiplayerServerDataSource* mMultiplayerServerDataSource;
416 
417  bool mInitialized;
418  ScreenToShow mScreenToShow;
419 
420 
421  };
422 
423 
424 //[-------------------------------------------------------]
425 //[ Namespace ]
426 //[-------------------------------------------------------]
427 } // em5
Definition: ActionPriority.h:13
Endless game data source.
Definition: EndlessGameDataSource.h:30
Main event window.
Definition: MainEventWindow.h:34
ScreenToShow
Definition: MainMenuManager.h:79
Freeplay window.
Definition: FreeplayWindow.h:35
Load campaign data source.
Definition: LoadCampaignDataSource.h:32
Start game window.
Definition: StartGame.h:41
Definition: VideoPlayerWindow.h:47
("List A") Used when usual gangster types are needed (e.g. pickpocket, robbery, ...)
#define EM5_API_EXPORT
Definition: Export.h:28
Multiplayer help window.
Definition: MultiplayerHelpWindow.h:44
Account status title window.
Definition: AccountStatusTitle.h:30
Main event data source.
Definition: MainEventDataSource.h:30
Preferences window.
Definition: PreferencesGraphicWindow.h:41
Multiplayer window.
Definition: MultiplayerWindow.h:43
Multiplayer direct connect window.
Definition: MultiplayerDirectConnectWindow.h:47
EMERGENCY 5 Main menu manager.
Definition: MainMenuManager.h:71
Preferences window.
Definition: ExtendedPreferencesGraphicWindow.h:34
Account status title data source.
Definition: AccountStatusTitleDataSource.h:31
BaseLayer window.
Definition: BaseLayer.h:30
Select campaign window.
Definition: SelectCampaign.h:30
Game preferences window.
Definition: PreferencesGameWindow.h:31
Achievements window data source.
Definition: AchievementsWindowDataSource.h:32
Account info window.
Definition: AccountInfo.h:39
Input window.
Definition: InputWindow.h:30
Achievements window.
Definition: AchievementsWindow.h:39
Select difficulty window.
Definition: SelectDifficultyWindow.h:31
Start campaign window.
Definition: StartCampaign.h:32
Multiplayer create server window.
Definition: MultiplayerCreateServerWindow.h:46
Credits window.
Definition: CreditsWindow.h:43
EMERGENCY 5 main menu GUI.
Definition: MainMenu.h:48
Multiplayer server data source.
Definition: MultiplayerServerDataSource.h:43
Multiplayer lobby window.
Definition: MultiplayerLobbyWindow.h:58
Preferences window.
Definition: PreferencesAudioWindow.h:32
Account status window.
Definition: AccountStatus.h:30