Emergency 20 Dokumentation  4.2.0
IngameMainEventSuccessWindow.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/gui/GuiDocument.h>
17 #include <qsf/job/JobProxy.h>
18 #include <qsf/audio/AudioProxy.h>
19 
20 
21 //[-------------------------------------------------------]
22 //[ Namespace ]
23 //[-------------------------------------------------------]
24 namespace em5
25 {
34  };
35 
36 
37  //[-------------------------------------------------------]
38  //[ Classes ]
39  //[-------------------------------------------------------]
49  {
50 
51 
52  //[-------------------------------------------------------]
53  //[ Public methods ]
54  //[-------------------------------------------------------]
55  public:
60  explicit IngameMainEventSuccessWindow(qsf::GuiContext& guiContext);
61 
67 
74  void setEventResults(MainEvent::EventResult& eventResults, uint32 mainEventNumber, uint32 silver, uint32 gold);
75 
76  void setMainEvent(MainEvent* mainEvent);
77 
78 
79  //[-------------------------------------------------------]
80  //[ Public virtual qsf::GuiDocument methods ]
81  //[-------------------------------------------------------]
82  public:
83  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
84 
85 
86  //[-------------------------------------------------------]
87  //[ Protected virtual em5::GuiHotReloadSupport methods ]
88  //[-------------------------------------------------------]
89  protected:
90  virtual void onReloadGui() override;
91  virtual bool onDocumentPreShow() override;
92 
93 
94  //[-------------------------------------------------------]
95  //[ Private methods ]
96  //[-------------------------------------------------------]
97  private:
98  void onShowWindow();
99 
104  void publish(bool state);
105 
106  void setPlayerControl(bool playerControl) const;
107 
108  void cleanupAfterEvent();
109 
114  void onUpdateAnimation(const qsf::JobArguments& jobArguments);
115 
116  void setupGui();
117 
118 
119  //[-------------------------------------------------------]
120  //[ Private data ]
121  //[-------------------------------------------------------]
122  private:
123  qsf::JobProxy mAnimationJobProxy;
124  MainEvent* mMainEvent;
125  AnimationState mAnimationState;
126  float mPastTime;
127  uint32 mTotalScore;
128  uint32 mCountingScore;
129  uint32 mMainEventNumber;
130  qsf::AudioProxy mAudioProxy;
131  qsf::AudioProxy mAudioProxyMedal;
132  bool mPlayMedalSound;
133  bool mLastMainEvent;
134 
135 
136  };
137 
138 
139 //[-------------------------------------------------------]
140 //[ Namespace ]
141 //[-------------------------------------------------------]
142 } // em5
Definition: ActionPriority.h:13
Definition: IngameMainEventSuccessWindow.h:27
Definition: FreeplayEvent.h:110
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override
Job proxy class.
Definition: JobProxy.h:51
EMERGENCY 5 main event base class.
Definition: MainEvent.h:48
unsigned int uint32
Definition: PlatformTypes.h:181
Definition: IngameMainEventSuccessWindow.h:32
virtual bool onDocumentPreShow() override
A base class which adds GUI hot reloading support to an GUI document.
Definition: GuiHotReloadSupport.h:34
void setMainEvent(MainEvent *mainEvent)
Definition: IngameMainEventSuccessWindow.h:28
Job arguments class: holds data to be passed to the called job method by the job manager.
Definition: JobArguments.h:40
The audio proxy resembles the playback of an audio asset.
Definition: AudioProxy.h:71
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
void setEventResults(MainEvent::EventResult &eventResults, uint32 mainEventNumber, uint32 silver, uint32 gold)
Set the results for the event.
Definition: IngameMainEventSuccessWindow.h:33
IngameMainEventSuccessWindow window.
Definition: IngameMainEventSuccessWindow.h:48
AnimationState
Definition: IngameMainEventSuccessWindow.h:26
Definition: IngameMainEventSuccessWindow.h:29
virtual ~IngameMainEventSuccessWindow()
Destructor.
Definition: IngameMainEventSuccessWindow.h:30
IngameMainEventSuccessWindow(qsf::GuiContext &guiContext)
Constructor.
virtual void onReloadGui() override
Gets called when the GUI should be reloaded.
Definition: IngameMainEventSuccessWindow.h:31