summaryrefslogtreecommitdiff
path: root/src/gui/skilldialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r--src/gui/skilldialog.cpp57
1 files changed, 56 insertions, 1 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 22d1db60..9506e7f8 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -40,6 +40,61 @@
#include "../utils/gettext.h"
#include "../utils/stringutils.h"
+class Skill_Tab : public GCContainer, public gcn::ActionListener
+{
+ public:
+ /**
+ * The type of this skill tab
+ */
+ const std::string type;
+
+ /**
+ * Constructor
+ */
+ Skill_Tab(const std::string &type);
+
+ /**
+ * Update this tab
+ */
+ void update();
+
+ /**
+ * Called when receiving actions from widget.
+ */
+ void action(const gcn::ActionEvent &event) {}
+
+ private:
+ /**
+ * Update the information of a skill at
+ * the given index
+ */
+ void updateSkill(int index);
+
+ /**
+ * Gets the number of skills in this particular
+ * type of tab.
+ */
+ int getSkillNum();
+
+ /**
+ * Get the first enumeration of this skill tab's
+ * skill type.
+ */
+ int getSkillBegin();
+
+ /**
+ * Get the icon associated with the given index
+ */
+ Icon* getIcon(int index);
+
+ std::vector<Icon *> mSkillIcons;
+ std::vector<gcn::Label *> mSkillNameLabels;
+ std::vector<gcn::Label *> mSkillLevelLabels;
+ std::vector<gcn::Label *> mSkillExpLabels;
+ std::vector<ProgressBar *> mSkillProgress;
+};
+
+
SkillDialog::SkillDialog():
Window(_("Skills"))
{
@@ -50,7 +105,7 @@ SkillDialog::SkillDialog():
TabbedArea *panel = new TabbedArea();
panel->setDimension(gcn::Rectangle(5, 5, 270, 420));
- Skill_Tab* tab;
+ Skill_Tab *tab;
// Add each type of skill tab to the panel
tab = new Skill_Tab("Weapon");