From dd2d81690185e789d435d5b1839c04bd8e77dea4 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 4 Jan 2005 14:16:59 +0000 Subject: Use custom ListBox and ScrollArea for skill dialog. --- src/gui/skill.h | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'src/gui/skill.h') 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 #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 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(); -- cgit v1.2.3-70-g09d2