summaryrefslogtreecommitdiff
path: root/src/gui/skilldialog.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-07-07 11:23:14 -0600
committerJared Adams <jaxad0127@gmail.com>2009-07-07 11:23:14 -0600
commit5662b7d9ad9eb6927df7ca83713d3b6108f59ddc (patch)
tree1e962203f7bf2440b558045967d0f93ccf21bbe4 /src/gui/skilldialog.h
parent851f67cd9975b090b051decb1deab6b0489d14c5 (diff)
downloadmana-5662b7d9ad9eb6927df7ca83713d3b6108f59ddc.tar.gz
mana-5662b7d9ad9eb6927df7ca83713d3b6108f59ddc.tar.bz2
mana-5662b7d9ad9eb6927df7ca83713d3b6108f59ddc.tar.xz
mana-5662b7d9ad9eb6927df7ca83713d3b6108f59ddc.zip
Use tmw-skills.xml instead of hardcoding
Diffstat (limited to 'src/gui/skilldialog.h')
-rw-r--r--src/gui/skilldialog.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/gui/skilldialog.h b/src/gui/skilldialog.h
index 56192273..fbd3c26d 100644
--- a/src/gui/skilldialog.h
+++ b/src/gui/skilldialog.h
@@ -29,10 +29,13 @@
#include <guichan/actionlistener.hpp>
#include <list>
+#include <map>
-class ProgressBar;
-class Icon;
-class SkillTab;
+class ScrollArea;
+class Tab;
+class TabbedArea;
+
+struct SkillInfo;
/**
* The skill dialog.
@@ -52,17 +55,26 @@ class SkillDialog : public Window, public gcn::ActionListener
void action(const gcn::ActionEvent &event);
/**
- * Update the tabs in this dialog
+ * Called when the widget changes size. Used for adapting the size of
+ * the tabbed area.
*/
- void update();
+ void widgetResized(const gcn::Event &event);
+
+ void logic();
/**
- * Draw this window.
- */
- void draw(gcn::Graphics *g);
+ * Update the given skill's display
+ */
+ std::string update(int id);
+
+ void loadSkills(const std::string &file, bool fixed = true);
private:
- std::list<SkillTab*> mTabs;
+ void adjustTabSize();
+
+ Tab *mCurrentTab;
+ TabbedArea *mTabs;
+ std::map<int, SkillInfo*> mSkills;
};
extern SkillDialog *skillDialog;