Emergency 20 Dokumentation  4.2.0
MultiplayerPlayerLeftMessage.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 //[-------------------------------------------------------]
14 
15 #include <qsf/gui/GuiDocument.h>
16 
17 
18 //[-------------------------------------------------------]
19 //[ Namespace ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23 
24 
25  //[-------------------------------------------------------]
26  //[ Classes ]
27  //[-------------------------------------------------------]
33  {
34 
35 
36  //[-------------------------------------------------------]
37  //[ Public methods ]
38  //[-------------------------------------------------------]
39  public:
40  explicit MultiplayerPlayerLeftMessage(qsf::GuiContext& guiContext);
42 
43 
44  //[-------------------------------------------------------]
45  //[ Public virtual qsf::GuiDocument methods ]
46  //[-------------------------------------------------------]
47  public:
48  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
49 
50 
51  //[-------------------------------------------------------]
52  //[ Private virtual qsf::GuiDocument methods ]
53  //[-------------------------------------------------------]
54  private:
55  virtual bool onPreShow() override;
56 
57 
58  //[-------------------------------------------------------]
59  //[ Private methods ]
60  //[-------------------------------------------------------]
61  private:
66  void onPlayerLeft(uint32 playerIndex, const multiplayer::SessionBase::PlayerInfo& playerInfo);
67 
72  void onHostLeft();
73 
78  void onStateChange(multiplayer::SessionBase::State prevState, multiplayer::SessionBase::State newState);
79 
84  void setupWindowConnectionLost();
85 
90  void setupWindowPlayerLeft(uint32 playerIndex);
91 
92  void disconnectSignals();
93 
94 
95  //[-------------------------------------------------------]
96  //[ Private data ]
97  //[-------------------------------------------------------]
98  private:
99  boost::signals2::connection mPlayerLeftSignalConnection;
100  boost::signals2::connection mConnectionLostSignalConnection;
101  boost::signals2::connection mHostLeftSignalConnection;
102 
103 
104  };
105 
106 
107 //[-------------------------------------------------------]
108 //[ Namespace ]
109 //[-------------------------------------------------------]
110 } // em5
Definition: ActionPriority.h:13
unsigned int uint32
Definition: PlatformTypes.h:181
Graphical User Interface (GUI) document base class.
Definition: GuiDocument.h:51
MultiplayerPlayerLeftMessage(qsf::GuiContext &guiContext)
Definition: SessionBase.h:105
EMERGENCY 5 player left session message HUD element.
Definition: MultiplayerPlayerLeftMessage.h:32
State
Definition: SessionBase.h:93
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62