diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-15 19:08:49 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-15 19:08:49 +0000 |
commit | 13f82f10d92816d0239db56b7936fd2403f50897 (patch) | |
tree | 8609c90794dc8bcba1f613c6cac9907e7e58d4e4 /src/gui/skill.h | |
parent | 8ed926ea15e8f151b8b81f93a5dccd0d53cf7ca1 (diff) | |
download | mana-13f82f10d92816d0239db56b7936fd2403f50897.tar.gz mana-13f82f10d92816d0239db56b7936fd2403f50897.tar.bz2 mana-13f82f10d92816d0239db56b7936fd2403f50897.tar.xz mana-13f82f10d92816d0239db56b7936fd2403f50897.zip |
Fixed upping skills.
Diffstat (limited to 'src/gui/skill.h')
-rw-r--r-- | src/gui/skill.h | 49 |
1 files changed, 13 insertions, 36 deletions
diff --git a/src/gui/skill.h b/src/gui/skill.h index 1d68bffe..5db90f04 100644 --- a/src/gui/skill.h +++ b/src/gui/skill.h @@ -24,59 +24,31 @@ #ifndef _TMW_SKILL_H #define _TMW_SKILL_H -#include <allegro.h> +#include <guichan.hpp> #include "window.h" struct SKILL { - short id; //index into "skill_db" array + short id; /**< Index into "skill_db" array */ short lv, sp; }; /** - * The skill list model. - * - * \ingroup GUI - */ -class SkillListModel : public gcn::ListModel -{ - private: - std::vector<SKILL*> skillList; - - public: - /** - * Constructor. - */ - SkillListModel(); - - /** - * Destructor. - */ - virtual ~SkillListModel(); - - int getNumberOfElements(); - std::string getElementAt(int); - - bool hasSkill(int id); - void addSkill(int id, int lv, int sp); - void setSkill(int id, int lv, int sp); -}; - -/** * The skill dialog. * * \ingroup GUI */ -class SkillDialog : public Window, public gcn::ActionListener +class SkillDialog : public Window, public gcn::ActionListener, + public gcn::ListModel { private: gcn::ListBox *skillListBox; gcn::ScrollArea *skillScrollArea; - SkillListModel *skills; gcn::Label *pointsLabel; - gcn::Button *incButton; gcn::Button *closeButton; + std::vector<SKILL*> skillList; + public: /** * Constructor. @@ -90,9 +62,14 @@ class SkillDialog : public Window, public gcn::ActionListener void action(const std::string&); - SkillListModel* getModel(); - void setPoints(int i); + + int getNumberOfElements(); + std::string getElementAt(int); + + bool hasSkill(int id); + void addSkill(int id, int lv, int sp); + void setSkill(int id, int lv, int sp); }; #endif |