Emergency 20 Dokumentation  4.2.0
IngameLoadSaveWindow.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 //[ Forward declarations ]
18 //[-------------------------------------------------------]
19 namespace em5
20 {
21  class LoadCampaignDataSource;
22 }
23 
24 
25 //[-------------------------------------------------------]
26 //[ Namespace ]
27 //[-------------------------------------------------------]
28 namespace em5
29 {
30 
31 
32  //[-------------------------------------------------------]
33  //[ Classes ]
34  //[-------------------------------------------------------]
40  {
41 
42 
43  //[-------------------------------------------------------]
44  //[ Public methods ]
45  //[-------------------------------------------------------]
46  public:
47  explicit IngameLoadSaveWindow(qsf::GuiContext& guiContext);
48  virtual ~IngameLoadSaveWindow();
49  void setupLoadGame();
50  void setupSaveGame();
51 
52 
53  //[-------------------------------------------------------]
54  //[ Public virtual qsf::GuiDocument methods ]
55  //[-------------------------------------------------------]
56  public:
57  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
58  virtual void onPreHide() override;
59 
60 
61  //[-------------------------------------------------------]
62  //[ Protected virtual em5::GuiHotReloadSupport methods ]
63  //[-------------------------------------------------------]
64  protected:
65  virtual void onReloadGui() override;
66 
67 
68  //[-------------------------------------------------------]
69  //[ Private methods ]
70  //[-------------------------------------------------------]
71  private:
72  void setupGui();
73  void loadSelectedSaveGame();
74  void deleteSaveGame(bool accept);
75  void saveGame();
76  void saveCampaignProgressAndScreenshot(bool accept, const LoadCampaignDataSource* loadCampaignDataSource, uint32 selectedItem);
77  void saveCampaignProgressAndScreenshot(const std::string& fileName, const std::string& name);
78  void setDefaultScreenshotTexture();
79  void createScreenshotTexture(const std::string& absolutePath);
80 
81 
82  //[-------------------------------------------------------]
83  //[ Private data ]
84  //[-------------------------------------------------------]
85  private:
86  std::string mSelectedFilename; // The filename for the selected saved game
87  bool mIsGameSaved;
88  bool mIsLoadWindow;
89  uint32 mSelectedItem;
90 
91 
92  };
93 
94 
95 //[-------------------------------------------------------]
96 //[ Namespace ]
97 //[-------------------------------------------------------]
98 } // em5
Definition: ActionPriority.h:13
Load campaign data source.
Definition: LoadCampaignDataSource.h:32
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override
unsigned int uint32
Definition: PlatformTypes.h:181
A base class which adds GUI hot reloading support to an GUI document.
Definition: GuiHotReloadSupport.h:34
virtual void onReloadGui() override
Gets called when the GUI should be reloaded.
virtual void onPreHide() override
Called before hide.
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
IngameLoadSaveWindow(qsf::GuiContext &guiContext)
EMERGENCY 5 ingame load/save window.
Definition: IngameLoadSaveWindow.h:39