Emergency 20 Dokumentation  4.2.0
AchievementsWindowDataSource.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 <Rocket/Controls/DataSource.h>
16 
17 
18 //[-------------------------------------------------------]
19 //[ Namespace ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23 
24 
25  //[-------------------------------------------------------]
26  //[ Classes ]
27  //[-------------------------------------------------------]
32  class AchievementsWindowDataSource : public Rocket::Controls::DataSource
33  {
34 
35 
36  //[-------------------------------------------------------]
37  //[ Public definitions ]
38  //[-------------------------------------------------------]
39  public:
40  struct TableData
41  {
44  float progress;
50  };
51 
52 
53  //[-------------------------------------------------------]
54  //[ Public methods ]
55  //[-------------------------------------------------------]
56  public:
59 
61  void setupAbstract();
62  void setupGeneral();
63  void setupMainEvent();
64  void setupFreeplay();
65  void setupChallenge();
66  void setupMultiplayCOOP();
67  void setupMultiplayAgainst();
68 
69 
70  //[-------------------------------------------------------]
71  //[ Public virtual Rocket::Controls::DataSource methods ]
72  //[-------------------------------------------------------]
73  public:
74  virtual void GetRow(Rocket::Core::StringList& row, const Rocket::Core::String& table, int rowIndex, const Rocket::Core::StringList& columns) override;
75  virtual int GetNumRows(const Rocket::Core::String& table) override;
76 
77 
78  //[-------------------------------------------------------]
79  //[ Private data ]
80  //[-------------------------------------------------------]
81  private:
82  void setupInternal(bool allAchievementPlaces, Achievement::AchievementPlace achievementPlace);
83 
84 
85  //[-------------------------------------------------------]
86  //[ Private data ]
87  //[-------------------------------------------------------]
88  private:
89  std::vector<TableData*> mTableData;
90  uint32 mUnlocked;
91 
92 
93  };
94 
95 
96 //[-------------------------------------------------------]
97 //[ Namespace ]
98 //[-------------------------------------------------------]
99 } // em5
Definition: ActionPriority.h:13
float progress
Definition: AchievementsWindowDataSource.h:44
virtual int GetNumRows(const Rocket::Core::String &table) override
Definition: AchievementsWindowDataSource.h:40
unsigned int uint32
Definition: PlatformTypes.h:181
float neededprogress
Definition: AchievementsWindowDataSource.h:45
AchievementPlace
Definition: Achievement.h:47
Rocket::Core::String description
Definition: AchievementsWindowDataSource.h:46
Rocket::Core::String name
Definition: AchievementsWindowDataSource.h:43
uint32 points
Definition: AchievementsWindowDataSource.h:47
Achievements window data source.
Definition: AchievementsWindowDataSource.h:32
Rocket::Core::String icon
Definition: AchievementsWindowDataSource.h:42
Definition: MiniMapWindow.h:43
virtual void GetRow(Rocket::Core::StringList &row, const Rocket::Core::String &table, int rowIndex, const Rocket::Core::StringList &columns) override
Rocket::Core::String unlocked
Definition: AchievementsWindowDataSource.h:48
uint32 campaignIndex
Definition: AchievementsWindowDataSource.h:49