summaryrefslogtreecommitdiff
path: root/src/gui/skill.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-04 14:16:59 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-04 14:16:59 +0000
commitdd2d81690185e789d435d5b1839c04bd8e77dea4 (patch)
tree7adb0d14f47242747a1af492e69fa5431aa13d99 /src/gui/skill.h
parent52b6be101b78990d5b4523dd5c6523dc5c7c6709 (diff)
downloadmana-dd2d81690185e789d435d5b1839c04bd8e77dea4.tar.gz
mana-dd2d81690185e789d435d5b1839c04bd8e77dea4.tar.bz2
mana-dd2d81690185e789d435d5b1839c04bd8e77dea4.tar.xz
mana-dd2d81690185e789d435d5b1839c04bd8e77dea4.zip
Use custom ListBox and ScrollArea for skill dialog.
Diffstat (limited to 'src/gui/skill.h')
-rw-r--r--src/gui/skill.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/gui/skill.h b/src/gui/skill.h
index 21f76212..78f48e30 100644
--- a/src/gui/skill.h
+++ b/src/gui/skill.h
@@ -21,8 +21,8 @@
* $Id$
*/
-#ifndef _SKILL_H
-#define _SKILL_H
+#ifndef _TMW_SKILL_H
+#define _TMW_SKILL_H
#include <allegro.h>
#include "button.h"
@@ -33,12 +33,17 @@ struct SKILL {
short lv, sp;
};
+/**
+ * The skill list model.
+ *
+ * \ingroup GUI
+ */
class SkillListModel : public gcn::ListModel
{
std::vector<SKILL*> skillList;
public:
SkillListModel();
- ~SkillListModel();
+ virtual ~SkillListModel();
int getNumberOfElements();
std::string getElementAt(int);
@@ -48,14 +53,22 @@ class SkillListModel : public gcn::ListModel
void setSkill(int id, int lv, int sp);
};
+/**
+ * The skill dialog.
+ *
+ * \ingroup GUI
+ */
class SkillDialog : public Window, public gcn::ActionListener
{
- gcn::ListBox *skillListBox;
- SkillListModel *skills;
- gcn::Label *pointsLabel;
+ private:
+ gcn::ListBox *skillListBox;
+ gcn::ScrollArea *skillScrollArea;
+ SkillListModel *skills;
+ gcn::Label *pointsLabel;
+
+ Button *incButton;
+ Button *closeButton;
- Button *incButton;
- Button *closeButton;
public:
SkillDialog(gcn::Container *);
~SkillDialog();