Emergency 20 Dokumentation  4.2.0
MultiplayerDirectConnectWindow.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 
17 //[-------------------------------------------------------]
18 //[ Forward declarations ]
19 //[-------------------------------------------------------]
20 namespace em5
21 {
22  namespace multiplayer
23  {
24  struct HostEntry;
25  namespace client
26  {
27  class Client;
28  }
29  }
30 }
31 
32 
33 //[-------------------------------------------------------]
34 //[ Namespace ]
35 //[-------------------------------------------------------]
36 namespace em5
37 {
38 
39 
40  //[-------------------------------------------------------]
41  //[ Classes ]
42  //[-------------------------------------------------------]
48  {
49 
50 
51  //[-------------------------------------------------------]
52  //[ Public methods ]
53  //[-------------------------------------------------------]
54  public:
55  explicit MultiplayerDirectConnectWindow(qsf::GuiContext& guiContext);
57 
58 
59  //[-------------------------------------------------------]
60  //[ Public virtual qsf::GuiDocument methods ]
61  //[-------------------------------------------------------]
62  public:
63  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
64 
65 
66  //[-------------------------------------------------------]
67  //[ Protected virtual em5::MainMenuWindowBase methods ]
68  //[-------------------------------------------------------]
69  protected:
70  virtual void onGoingBack() override;
71 
72 
73  //[-------------------------------------------------------]
74  //[ Protected virtual em5::GuiHotReloadSupport methods ]
75  //[-------------------------------------------------------]
76  protected:
77  virtual void onReloadGui() override;
78  virtual bool onDocumentPreShow() override;
79  virtual void onDocumentPreHide() override;
80 
81 
82  //[-------------------------------------------------------]
83  //[ Private methods ]
84  //[-------------------------------------------------------]
85  private:
86  void setupGui();
87  void onCurrentStateChanged(multiplayer::SessionBase::State prevState, multiplayer::SessionBase::State newState);
88  void connectByIp();
89 
90 
91  //[-------------------------------------------------------]
92  //[ Private data ]
93  //[-------------------------------------------------------]
94  private:
95  multiplayer::HostEntry mDirectConnectHostEntry;
96  multiplayer::client::Client* mMultiplayerClient;
97 
98  Rocket::Core::Element* mIpAddressElement;
99  Rocket::Core::Element* mPasswordElement;
100  Rocket::Core::Element* mConnectionElement;
101  Rocket::Core::Element* mModElement;
102  Rocket::Core::Element* mCancelConnectionElement;
103 
104 
105  };
106 
107 
108 //[-------------------------------------------------------]
109 //[ Namespace ]
110 //[-------------------------------------------------------]
111 } // em5
MultiplayerDirectConnectWindow(qsf::GuiContext &guiContext)
Definition: ActionPriority.h:13
virtual void onGoingBack() override
virtual void onDocumentPreHide() override
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override
Multiplayer direct connect window.
Definition: MultiplayerDirectConnectWindow.h:47
State
Definition: SessionBase.h:93
virtual void onReloadGui() override
Gets called when the GUI should be reloaded.
Base window for main menu windows.
Definition: MainMenuWindowBase.h:40
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
virtual bool onDocumentPreShow() override
EMERGENCY 5 multiplayer client class.
Definition: Client.h:69
Definition: MatchmakingTypes.h:47