Emergency 20 Dokumentation  4.2.0
MainEventWindow.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 //[-------------------------------------------------------]
15 
16 #include <qsf/job/JobProxy.h>
17 #include <qsf/time/DateTime.h>
18 
19 
20 //[-------------------------------------------------------]
21 //[ Namespace ]
22 //[-------------------------------------------------------]
23 namespace em5
24 {
25 
26 
27  //[-------------------------------------------------------]
28  //[ Classes ]
29  //[-------------------------------------------------------]
35  {
36 
37 
38  //[-------------------------------------------------------]
39  //[ Public methods ]
40  //[-------------------------------------------------------]
41  public:
42  explicit MainEventWindow(qsf::GuiContext& guiContext);
43  virtual ~MainEventWindow();
44 
45  void setSelectedMainEventNumber(int32 number);
46 
47 
48  //[-------------------------------------------------------]
49  //[ Public virtual qsf::GuiDocument methods ]
50  //[-------------------------------------------------------]
51  public:
52  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
53 
54 
55  //[-------------------------------------------------------]
56  //[ Protected virtual em5::MainMenuWindowBase methods ]
57  //[-------------------------------------------------------]
58  protected:
59  virtual void onGoingBack() override;
60 
61 
62  //[-------------------------------------------------------]
63  //[ Protected virtual em5::GuiHotReloadSupport methods ]
64  //[-------------------------------------------------------]
65  protected:
66  virtual void onReloadGui() override;
67  virtual bool onDocumentPreShow() override;
68  virtual void onDocumentPreHide() override;
69 
70 
71  //[-------------------------------------------------------]
72  //[ Private methods ]
73  //[-------------------------------------------------------]
74  private:
75  void setupGui();
76  void setInfo();
77  void startMainEventByNumber(int32 number);
78  void openSelectDifficultyWindow(int32 autostartMainEventNumber = qsf::getUninitialized<int32>());
79  qsf::DateTime getYoungestDate(const boost::container::flat_set<HighscoreEntry>& set);
80  void blinkCampaignButton();
81  void onBlink(const qsf::JobArguments& jobArguments);
82 
83 
84  //[-------------------------------------------------------]
85  //[ Private data ]
86  //[-------------------------------------------------------]
87  private:
88  int mSelectedNumber;
89  float mBlinkPhase;
90  qsf::JobProxy mBlinkJobProxy;
91 
92 
93  };
94 
95 
96 //[-------------------------------------------------------]
97 //[ Namespace ]
98 //[-------------------------------------------------------]
99 } // em5
Definition: ActionPriority.h:13
Data type for encapsulating date time information (in UTC)
Definition: DateTime.h:37
Job proxy class.
Definition: JobProxy.h:51
Main event window.
Definition: MainEventWindow.h:34
virtual void onDocumentPreHide() override
virtual ~MainEventWindow()
Job arguments class: holds data to be passed to the called job method by the job manager.
Definition: JobArguments.h:40
Base window for main menu windows.
Definition: MainMenuWindowBase.h:40
MainEventWindow(qsf::GuiContext &guiContext)
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
virtual void onGoingBack() override
virtual void onReloadGui() override
Gets called when the GUI should be reloaded.
signed int int32
Definition: PlatformTypes.h:180
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override
virtual bool onDocumentPreShow() override
void setSelectedMainEventNumber(int32 number)