diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-20 20:56:59 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-20 20:56:59 +0000 |
commit | 7ce021a8e4fce72af6e79cad22243bdd50bb8656 (patch) | |
tree | 06f9eadde06667d640f94e8ecc8b526a45af402d /src/gui/skill.h | |
parent | 368c9002365118212d9ef9b6bb00f9148522770f (diff) | |
download | mana-client-7ce021a8e4fce72af6e79cad22243bdd50bb8656.tar.gz mana-client-7ce021a8e4fce72af6e79cad22243bdd50bb8656.tar.bz2 mana-client-7ce021a8e4fce72af6e79cad22243bdd50bb8656.tar.xz mana-client-7ce021a8e4fce72af6e79cad22243bdd50bb8656.zip |
Reverted changes to skill dialog, a new one will be developed alongside it so
that the current one remains working for now. Also XML maps now can load but
not the base64 or gzip kind yet.
Diffstat (limited to 'src/gui/skill.h')
-rw-r--r-- | src/gui/skill.h | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/gui/skill.h b/src/gui/skill.h index 6ee511cc..5db90f04 100644 --- a/src/gui/skill.h +++ b/src/gui/skill.h @@ -24,28 +24,21 @@ #ifndef _TMW_SKILL_H #define _TMW_SKILL_H - #include <guichan.hpp> #include "window.h" -#include <vector> + +struct SKILL { + short id; /**< Index into "skill_db" array */ + short lv, sp; +}; + /** * The skill dialog. * * \ingroup GUI */ - -// skill struct, by Kyokai -// skill names are stored in a table elsewhere. (SkillDialog.cpp) -typedef struct { - short level; // level of the skill - short exp; // exp value - double mod; // value of the modifier (0,0.5,1,2,4) - // next value can be calculated when needed by the function: - // 20 * level^1.2 - } SKILL; - -class SkillDialog : public Window, public gcn::ActionListener -// public gcn::ListModel +class SkillDialog : public Window, public gcn::ActionListener, + public gcn::ListModel { private: gcn::ListBox *skillListBox; @@ -54,6 +47,8 @@ class SkillDialog : public Window, public gcn::ActionListener gcn::Button *incButton; gcn::Button *closeButton; + std::vector<SKILL*> skillList; + public: /** * Constructor. @@ -66,6 +61,15 @@ class SkillDialog : public Window, public gcn::ActionListener ~SkillDialog(); void action(const std::string&); + + 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 |