summaryrefslogtreecommitdiff
path: root/src/gui/skilldialog.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-21 23:17:42 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-21 23:18:46 +0300
commite8ea0251867c12ed1f6122a37b21044279774be5 (patch)
tree78426d0aeee6fda9bfd85047e241884f3f6c232a /src/gui/skilldialog.h
parentcff8c1925f426dafaeb32def5fc56f170bafba39 (diff)
downloadmanaverse-e8ea0251867c12ed1f6122a37b21044279774be5.tar.gz
manaverse-e8ea0251867c12ed1f6122a37b21044279774be5.tar.bz2
manaverse-e8ea0251867c12ed1f6122a37b21044279774be5.tar.xz
manaverse-e8ea0251867c12ed1f6122a37b21044279774be5.zip
improve skilldialog class.
split skilldialog file.
Diffstat (limited to 'src/gui/skilldialog.h')
-rw-r--r--src/gui/skilldialog.h68
1 files changed, 4 insertions, 64 deletions
diff --git a/src/gui/skilldialog.h b/src/gui/skilldialog.h
index 2a9f69a77..ad3df5f8b 100644
--- a/src/gui/skilldialog.h
+++ b/src/gui/skilldialog.h
@@ -25,13 +25,7 @@
#include "gui/widgets/window.h"
-#include "resources/soundinfo.h"
-
#include <guichan/actionlistener.hpp>
-#include <guichan/mouselistener.hpp>
-
-#include <map>
-#include <vector>
const int SKILL_MIN_ID = 200000;
const unsigned int SKILL_VAR_MIN_ID = 1000000;
@@ -43,61 +37,7 @@ class SkillModel;
class Tab;
class TabbedArea;
-struct SkillData final
-{
- std::string name;
- std::string shortName;
- std::string dispName;
- std::string description;
- Image *icon;
-
- std::string particle;
- SoundInfo soundHit;
- SoundInfo soundMiss;
-
- SkillData();
- A_DELETE_COPY(SkillData)
- ~SkillData();
-
- void setIcon(const std::string &iconPath);
-};
-
-typedef std::map<int, SkillData*> SkillDataMap;
-typedef SkillDataMap::iterator SkillDataMapIter;
-typedef SkillDataMap::const_iterator SkillDataMapCIter;
-
-struct SkillInfo final
-{
- int level;
- std::string skillLevel;
- int skillLevelWidth;
- unsigned int id;
- bool modifiable;
- bool visible;
- SkillModel *model;
- std::string skillExp;
- float progress;
- int range;
- gcn::Color color;
-
- SkillData *data;
- SkillDataMap dataMap;
-
- SkillInfo();
- A_DELETE_COPY(SkillInfo)
- ~SkillInfo();
-
- void update();
-
- SkillData *getData(const int level);
-
- SkillData *getData1(const int level);
-
- void addData(const int level, SkillData *const data);
-};
-
-typedef std::vector<SkillInfo*> SkillList;
-typedef SkillList::iterator SkillListIter;
+struct SkillInfo;
/**
* The skill dialog.
@@ -137,20 +77,20 @@ class SkillDialog final : public Window, public gcn::ActionListener
void addSkill(const int id, const int level, const int range,
const bool modifiable);
- SkillInfo* getSkill(int id) A_WARN_UNUSED;
+ SkillInfo* getSkill(const int id) A_WARN_UNUSED;
bool hasSkills() const A_WARN_UNUSED
{ return !mSkills.empty(); }
void widgetResized(const gcn::Event &event) override;
- void useItem(const int itemId);
+ void useItem(const int itemId) const;
void updateTabSelection();
void updateQuest(const int var, const int val);
- void playUpdateEffect(const int id);
+ void playUpdateEffect(const int id) const;
private:
typedef std::map<int, SkillInfo*> SkillMap;