Emergency 20 Dokumentation  4.2.0
SelectCampaign.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 
16 //[-------------------------------------------------------]
17 //[ Namespace ]
18 //[-------------------------------------------------------]
19 namespace em5
20 {
21 
22 
23  //[-------------------------------------------------------]
24  //[ Classes ]
25  //[-------------------------------------------------------]
31  {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Public methods ]
36  //[-------------------------------------------------------]
37  public:
38  explicit SelectCampaign(qsf::GuiContext& guiContext);
39  virtual ~SelectCampaign();
40 
41  void setSelectedCampaignIndex(uint32 campaignIndex);
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  //[ Protected virtual em5::MainMenuWindowBase methods ]
53  //[-------------------------------------------------------]
54  protected:
55  virtual void onGoingBack() override;
56 
57 
58  //[-------------------------------------------------------]
59  //[ Protected virtual em5::GuiHotReloadSupport methods ]
60  //[-------------------------------------------------------]
61  protected:
62  virtual void onReloadGui() override;
63  virtual bool onDocumentPreShow() override;
64 
65 
66  //[-------------------------------------------------------]
67  //[ Private methods ]
68  //[-------------------------------------------------------]
69  private:
70  void setupGui();
71  void selectCampaignByIndex(uint32 campaignIndex);
72  void startCampaignByIndex(uint32 campaignIndex);
73  void onPlayTutorial(bool accepted, uint32 campaignIndex);
74 
75 
76  //[-------------------------------------------------------]
77  //[ Private data ]
78  //[-------------------------------------------------------]
79  private:
80  uint32 mSelectedCampaignIndex;
81 
82 
83  };
84 
85 
86 //[-------------------------------------------------------]
87 //[ Namespace ]
88 //[-------------------------------------------------------]
89 } // em5
Definition: ActionPriority.h:13
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override
virtual ~SelectCampaign()
virtual bool onDocumentPreShow() override
unsigned int uint32
Definition: PlatformTypes.h:181
void setSelectedCampaignIndex(uint32 campaignIndex)
SelectCampaign(qsf::GuiContext &guiContext)
virtual void onReloadGui() override
Gets called when the GUI should be reloaded.
Select campaign window.
Definition: SelectCampaign.h:30
Base window for main menu windows.
Definition: MainMenuWindowBase.h:40
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
virtual void onGoingBack() override