summaryrefslogtreecommitdiff
path: root/src/gui/skill.h
diff options
context:
space:
mode:
authorAaron Marks <nymacro@gmail.com>2005-01-04 04:46:02 +0000
committerAaron Marks <nymacro@gmail.com>2005-01-04 04:46:02 +0000
commit52b6be101b78990d5b4523dd5c6523dc5c7c6709 (patch)
tree0990d5d596a0910d037bcab6853ecf9b073939ff /src/gui/skill.h
parent2be6f298a1c39dff04070588f75a3bed0c495b8b (diff)
downloadmana-client-52b6be101b78990d5b4523dd5c6523dc5c7c6709.tar.gz
mana-client-52b6be101b78990d5b4523dd5c6523dc5c7c6709.tar.bz2
mana-client-52b6be101b78990d5b4523dd5c6523dc5c7c6709.tar.xz
mana-client-52b6be101b78990d5b4523dd5c6523dc5c7c6709.zip
Converted Skills dialog from old gui to Guichan. Files modified: graphics.cpp, graphics.h, game.cpp, main.cpp, skills.h, skills.cpp. Other files are unmodified (timestamp error)
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