Emergency 20 Dokumentation  4.2.0
LogoScreen.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>
15 #include <qsf/job/JobProxy.h>
16 #include <qsf/time/Time.h>
17 
18 
19 //[-------------------------------------------------------]
20 //[ Forward declarations ]
21 //[-------------------------------------------------------]
22 namespace qsf
23 {
24  class VideoPlayer;
25 }
26 
27 
28 //[-------------------------------------------------------]
29 //[ Namespace ]
30 //[-------------------------------------------------------]
31 namespace em5
32 {
33 
34 
35  //[-------------------------------------------------------]
36  //[ Classes ]
37  //[-------------------------------------------------------]
43  {
44 
45 
46  //[-------------------------------------------------------]
47  //[ Public methods ]
48  //[-------------------------------------------------------]
49  public:
50  explicit LogoScreen(qsf::GuiContext& guiContext);
51  virtual ~LogoScreen();
52 
53 
54  //[-------------------------------------------------------]
55  //[ Public virtual qsf::GuiDocument methods ]
56  //[-------------------------------------------------------]
57  public:
58  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
59  virtual void processViewportDimensionsChanged(int width, int height) override;
60 
61 
62  //[-------------------------------------------------------]
63  //[ Public virtual qsf::InputListener methods ]
64  //[-------------------------------------------------------]
65  public:
66  virtual void eventReceived(const qsf::InputEvent& inputEvent, Response& response) override;
67 
68 
69  //[-------------------------------------------------------]
70  //[ Private methods ]
71  //[-------------------------------------------------------]
72  private:
73  void updateJob(const qsf::JobArguments&);
74  void setupVideo(const std::string& filename, Rocket::Core::Element* videoPlaneElement);
75  void updateVideoRect(Rocket::Core::Element* videoPlaneElement);
76  void skipOneLogo();
77 
78 
79  //[-------------------------------------------------------]
80  //[ Private data ]
81  //[-------------------------------------------------------]
82  private:
83  enum State
84  {
85  STATE_INIT,
86  STATE_FIRST_LOGO,
87  STATE_FIRST_LOGO_PLAY,
88  STATE_FIRST_DELAY,
89  STATE_SECOND_LOGO,
90  STATE_SECOND_LOGO_PLAY,
91  STATE_SECOND_DELAY,
92  STATE_THIRD_LOGO,
93  STATE_THIRD_PLAY,
94  STATE_THIRD_DELAY,
95  STATE_END
96  };
97  State mState;
98 
99  uint32 mWidth;
100  uint32 mHeight;
101  float mGuiVolume;
102 
103  qsf::JobProxy mUpdateJobProxy;
104  qsf::Time mTime;
105  qsf::VideoPlayer* mVideoPlayer;
106 
107 
108  };
109 
110 
111 //[-------------------------------------------------------]
112 //[ Namespace ]
113 //[-------------------------------------------------------]
114 } // em5
Definition: ActionPriority.h:13
virtual void processViewportDimensionsChanged(int width, int height) override
Job proxy class.
Definition: JobProxy.h:51
virtual void eventReceived(const qsf::InputEvent &inputEvent, Response &response) override
unsigned int uint32
Definition: PlatformTypes.h:181
Input listener class.
Definition: InputListener.h:43
Input event base class.
Definition: InputEvent.h:40
Graphical User Interface (GUI) document base class.
Definition: GuiDocument.h:51
Job arguments class: holds data to be passed to the called job method by the job manager.
Definition: JobArguments.h:40
virtual ~LogoScreen()
Definition: PickupPersonByParamedicAction.h:21
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
LogoScreen(qsf::GuiContext &guiContext)
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override
Self-contained video player.
Definition: VideoPlayer.h:55
EMERGENCY 5 logo screen.
Definition: LogoScreen.h:42
Definition: InputListener.h:51
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32