summaryrefslogtreecommitdiff
path: root/src/gui/specialswindow.h
diff options
context:
space:
mode:
authorPhilipp Sehmisch <mana@crushnet.org>2010-07-10 19:00:50 +0200
committerPhilipp Sehmisch <mana@crushnet.org>2010-07-10 19:00:50 +0200
commit105438d77ce83972d70a1ce67728aaf72c9ec2b6 (patch)
treeb290e4f106e33226bac0ada8c30377674683dfda /src/gui/specialswindow.h
parent9b72b2760e333e92877ec1e4d002fec6e612ad0e (diff)
downloadmana-client-105438d77ce83972d70a1ce67728aaf72c9ec2b6.tar.gz
mana-client-105438d77ce83972d70a1ce67728aaf72c9ec2b6.tar.bz2
mana-client-105438d77ce83972d70a1ce67728aaf72c9ec2b6.tar.xz
mana-client-105438d77ce83972d70a1ce67728aaf72c9ec2b6.zip
Moved parsing of specials.xml from gui/specialswindow.cpp to separate source files.
Restored functional recharge bars in specials window. Individual specials are only shown after the server informed the client about their status. Made level label, use button and progress bars optional. Their use is controlled through specials.xml. The special window button is again shown even when the player has no specials. This problem needs to be solved differently now for architecture reasons. Reviewed-by: Jaxad0127
Diffstat (limited to 'src/gui/specialswindow.h')
-rw-r--r--src/gui/specialswindow.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/gui/specialswindow.h b/src/gui/specialswindow.h
index 81384856..634727e5 100644
--- a/src/gui/specialswindow.h
+++ b/src/gui/specialswindow.h
@@ -25,6 +25,8 @@
#include "guichanfwd.h"
+#include "localplayer.h"
+
#include "gui/widgets/window.h"
#include <guichan/actionlistener.hpp>
@@ -36,7 +38,7 @@ class ScrollArea;
class Tab;
class TabbedArea;
-struct SpecialInfo;
+struct SpecialEntry;
class SpecialsWindow : public Window, public gcn::ActionListener {
public:
@@ -49,20 +51,14 @@ class SpecialsWindow : public Window, public gcn::ActionListener {
*/
void action(const gcn::ActionEvent &actionEvent);
- /**
- * Update the given special's display
- */
- std::string update(int id);
-
- void loadSpecials(const std::string &file);
-
- bool hasSpecials() { return !mSpecials.empty(); }
+ void draw(gcn::Graphics *graphics);
private:
- std::vector<gcn::Button *> mSpellButtons;
- typedef std::map<int, SpecialInfo*> SpecialMap;
- SpecialMap mSpecials;
+ // (re)constructs the list of specials
+ void rebuild(const std::map<int, Special> &specialData);
+
TabbedArea *mTabs;
+ std::map<int, SpecialEntry *> mEntries;
};
extern SpecialsWindow *specialsWindow;