summaryrefslogtreecommitdiff
path: root/src/gui/skill.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/skill.h')
-rw-r--r--src/gui/skill.h49
1 files changed, 34 insertions, 15 deletions
diff --git a/src/gui/skill.h b/src/gui/skill.h
index 33e94a18..21f76212 100644
--- a/src/gui/skill.h
+++ b/src/gui/skill.h
@@ -21,30 +21,49 @@
* $Id$
*/
-#ifdef WIN32
- #pragma warning (disable:4312)
-#endif
-
#ifndef _SKILL_H
#define _SKILL_H
#include <allegro.h>
+#include "button.h"
#include "../main.h"
-//DIALOG skill_dialog[];
+struct SKILL {
+ short id; //index into "skill_db" array
+ short lv, sp;
+};
-extern int n_skills;
+class SkillListModel : public gcn::ListModel
+{
+ std::vector<SKILL*> skillList;
+ public:
+ SkillListModel();
+ ~SkillListModel();
-struct SKILL {
- short id, lv, sp;
- SKILL *next;
+ 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);
};
+class SkillDialog : public Window, public gcn::ActionListener
+{
+ gcn::ListBox *skillListBox;
+ SkillListModel *skills;
+ gcn::Label *pointsLabel;
+
+ Button *incButton;
+ Button *closeButton;
+ public:
+ SkillDialog(gcn::Container *);
+ ~SkillDialog();
+
+ void action(const std::string&);
+ SkillListModel* getModel() { return skills; }
+
+ void setPoints(int i);
+};
-void update_skill_dialog();
-void add_skill(short id, short lv, short sp);
-char *skill_list(int index, int *list_size);
-int get_skill_id(int index);
-SKILL *is_skill(int id);
-void increaseStatus(void *dp3, int d1);
#endif