Emergency 20 Dokumentation  4.2.0
StartCampaign.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/job/JobProxy.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 StartCampaign(qsf::GuiContext& guiContext);
41  virtual ~StartCampaign();
42  void deleteSaveGame(bool accepted);
43 
44 
45  //[-------------------------------------------------------]
46  //[ Public virtual qsf::GuiDocument methods ]
47  //[-------------------------------------------------------]
48  public:
49  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
50 
51 
52  //[-------------------------------------------------------]
53  //[ Protected virtual em5::MainMenuWindowBase methods ]
54  //[-------------------------------------------------------]
55  protected:
56  virtual void onGoingBack() override;
57 
58 
59  //[-------------------------------------------------------]
60  //[ Protected virtual em5::GuiHotReloadSupport methods ]
61  //[-------------------------------------------------------]
62  protected:
63  virtual void onReloadGui() override;
64  virtual bool onDocumentPreShow() override;
65  virtual void onDocumentPreHide() override;
66 
67 
68  //[-------------------------------------------------------]
69  //[ Private methods ]
70  //[-------------------------------------------------------]
71  private:
72  void setupGui();
73  void createScreenshotTexture(const std::string& absolutePath);
74  void blinkButton(bool campaign);
75  void onBlink(const qsf::JobArguments& jobArguments);
76  void loadSelectedSaveGame();
77 
78 
79  //[-------------------------------------------------------]
80  //[ Private data ]
81  //[-------------------------------------------------------]
82  private:
83  uint32 mSelectedItem;
84  qsf::JobProxy mBlinkJobProxy;
85  Rocket::Core::Element* mBlinkButton;
86 
87 
88  };
89 
90 
91 //[-------------------------------------------------------]
92 //[ Namespace ]
93 //[-------------------------------------------------------]
94 } // em5
Definition: ActionPriority.h:13
Job proxy class.
Definition: JobProxy.h:51
virtual ~StartCampaign()
virtual void onGoingBack() override
unsigned int uint32
Definition: PlatformTypes.h:181
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override
Job arguments class: holds data to be passed to the called job method by the job manager.
Definition: JobArguments.h:40
virtual void onDocumentPreHide() override
Base window for main menu windows.
Definition: MainMenuWindowBase.h:40
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
virtual void onReloadGui() override
Gets called when the GUI should be reloaded.
StartCampaign(qsf::GuiContext &guiContext)
Start campaign window.
Definition: StartCampaign.h:32
virtual bool onDocumentPreShow() override
void deleteSaveGame(bool accepted)