Emergency 20 Dokumentation  4.2.0
IngameEventFailedWindow.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 #include <qsf/audio/AudioProxy.h>
15 
16 
17 //[-------------------------------------------------------]
18 //[ Namespace ]
19 //[-------------------------------------------------------]
20 namespace em5
21 {
22 
23 
24  //[-------------------------------------------------------]
25  //[ Classes ]
26  //[-------------------------------------------------------]
35  {
36 
37 
38  //[-------------------------------------------------------]
39  //[ Public methods ]
40  //[-------------------------------------------------------]
41  public:
42  explicit IngameEventFailedWindow(qsf::GuiContext& guiContext);
43  virtual ~IngameEventFailedWindow();
44 
45  void stopGameSimulation();
46  void setFailedText(const std::string& eventName, const std::string& failedReason);
47 
48 
49  //[-------------------------------------------------------]
50  //[ Public virtual qsf::GuiDocument methods ]
51  //[-------------------------------------------------------]
52  public:
53  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
54 
55 
56  //[-------------------------------------------------------]
57  //[ Protected virtual em5::IngameEventFailedWindow methods]
58  //[-------------------------------------------------------]
59  protected:
60  virtual void triggerRepeatEvent();
61 
62 
63  //[-------------------------------------------------------]
64  //[ Private virtual qsf::GuiDocument methods ]
65  //[-------------------------------------------------------]
66  private:
67  virtual bool onPreShow() override;
68 
69 
70  //[-------------------------------------------------------]
71  //[ Protected methods ]
72  //[-------------------------------------------------------]
73  protected:
74  void setPlayerControl(bool playerControl) const;
75 
76 
77  //[-------------------------------------------------------]
78  //[ Private data ]
79  //[-------------------------------------------------------]
80  private:
81  qsf::AudioProxy mAudioProxy;
82 
83 
84  };
85 
86 
87 //[-------------------------------------------------------]
88 //[ Namespace ]
89 //[-------------------------------------------------------]
90 } // em5
Definition: ActionPriority.h:13
void setPlayerControl(bool playerControl) const
virtual void triggerRepeatEvent()
Graphical User Interface (GUI) document base class.
Definition: GuiDocument.h:51
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
IngameEventFailedWindow(qsf::GuiContext &guiContext)
void setFailedText(const std::string &eventName, const std::string &failedReason)
Window to show when an event fails that the player is required to solve.
Definition: IngameEventFailedWindow.h:34
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override