Emergency 20 Dokumentation  4.2.0
IngameMultiplayerPvPEndWindow.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/math/Color3.h>
15 
16 
17 //[-------------------------------------------------------]
18 //[ Forward declarations ]
19 //[-------------------------------------------------------]
20 namespace em5
21 {
22  namespace multiplayer
23  {
24  struct GameModeUpdateData;
25  }
26 }
27 
28 
29 //[-------------------------------------------------------]
30 //[ Namespace ]
31 //[-------------------------------------------------------]
32 namespace em5
33 {
34 
35 
36  //[-------------------------------------------------------]
37  //[ Classes ]
38  //[-------------------------------------------------------]
44  {
45 
46 
47  // This struct stores the player informations
48  struct PlayerInformation
49  {
50  std::string name;
51  uint32 score;
52  qsf::Color3 color;
53  };
54 
55 
56  //[-------------------------------------------------------]
57  //[ Public methods ]
58  //[-------------------------------------------------------]
59  public:
60  explicit IngameMultiplayerPvPEndWindow(qsf::GuiContext& guiContext);
61 
63 
64  void setEventCount(uint32 failedEvents, uint32 succeededEvents);
65 
66  void incrementFailedEvents();
68 
69 
70  //[-------------------------------------------------------]
71  //[ Public virtual qsf::GuiDocument methods ]
72  //[-------------------------------------------------------]
73  public:
74  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
75 
76 
77  //[-------------------------------------------------------]
78  //[ Private virtual qsf::GuiDocument methods ]
79  //[-------------------------------------------------------]
80  private:
81  virtual bool onPreShow() override;
82 
83 
84  //[-------------------------------------------------------]
85  //[ Private methods ]
86  //[-------------------------------------------------------]
87  private:
88  void onGameModeDataChanged(const multiplayer::GameModeUpdateData& gameModeData);
89 
94  void publish(bool state);
95 
96 
97  //[-------------------------------------------------------]
98  //[ Private data ]
99  //[-------------------------------------------------------]
100  private:
101  std::vector<PlayerInformation> mPlayerList;
102 
103  uint32 mFailedEvents;
104  uint32 mSucceededEvents;
105  uint32 mPlayerHighscore;
106 
107 
108  };
109 
110 
111 //[-------------------------------------------------------]
112 //[ Namespace ]
113 //[-------------------------------------------------------]
114 } // em5
Definition: ActionPriority.h:13
void setEventCount(uint32 failedEvents, uint32 succeededEvents)
unsigned int uint32
Definition: PlatformTypes.h:181
Graphical User Interface (GUI) document base class.
Definition: GuiDocument.h:51
Color class with red, green and blue component.
Definition: Color3.h:30
Definition: OperationMessages.h:346
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
IngameMultiplayerPvPEndWindow(qsf::GuiContext &guiContext)
EMERGENCY 5 multiplayer PvP end sreen.
Definition: IngameMultiplayerPvPEndWindow.h:43
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override