diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-07-19 22:05:41 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-07-19 22:30:18 -0600 |
commit | 5141dc4a99b74358f2dd0f5f211c5069a630ce1b (patch) | |
tree | 647cfb05d179d61759ef3679482eb204a7853d34 /src/gui/statuswindow.h | |
parent | 2e8fca7d471b4e2bf20735a0669e96722c000669 (diff) | |
download | mana-client-5141dc4a99b74358f2dd0f5f211c5069a630ce1b.tar.gz mana-client-5141dc4a99b74358f2dd0f5f211c5069a630ce1b.tar.bz2 mana-client-5141dc4a99b74358f2dd0f5f211c5069a630ce1b.tar.xz mana-client-5141dc4a99b74358f2dd0f5f211c5069a630ce1b.zip |
Merge StatusWindows
Also some other small merges
Diffstat (limited to 'src/gui/statuswindow.h')
-rw-r--r-- | src/gui/statuswindow.h | 79 |
1 files changed, 39 insertions, 40 deletions
diff --git a/src/gui/statuswindow.h b/src/gui/statuswindow.h index b7623806..79382cd5 100644 --- a/src/gui/statuswindow.h +++ b/src/gui/statuswindow.h @@ -28,72 +28,71 @@ #include <guichan/actionlistener.hpp> -class LocalPlayer; +#include <map> + +class AttrDisplay; class ProgressBar; +class ScrollArea; +class VertContainer; /** * The player status dialog. * * \ingroup Interface */ -class StatusWindow : public Window, public gcn::ActionListener +class StatusWindow : public Window { public: + enum { // Some update constants + HP = -1, + MP = -2, + EXP = -3, + MONEY = -4, + CHAR_POINTS = -5, + LEVEL = -6 + }; + /** * Constructor. */ StatusWindow(); - /** - * Called when receiving actions from widget. - */ - void action(const gcn::ActionEvent &event); - - /** - * Updates this dialog with values from PLAYER_INFO *char_info - */ - void update(); + std::string update(int id); - void update(int id); + void setPointsNeeded(int id, int needed); void addAttribute(int id, const std::string &name, bool modifiable); static void updateHPBar(ProgressBar *bar, bool showMax = false); + static void updateMPBar(ProgressBar *bar, bool showMax = false); + static void updateXPBar(ProgressBar *bar, bool percent = true); + static void updateProgressBar(ProgressBar *bar, int value, int max, + bool percent); + static void updateProgressBar(ProgressBar *bar, int id, + bool percent = true); private: /** * Status Part */ - gcn::Label *mLvlLabel, *mMoneyLabel, *mHpLabel, *mHpValueLabel; - ProgressBar *mHpBar; + gcn::Label *mLvlLabel, *mMoneyLabel; + gcn::Label *mHpLabel, *mMpLabel, *mXpLabel; + ProgressBar *mHpBar, *mMpBar, *mXpBar; - /** - * Derived Statistics captions - */ -/* - gcn::Label *mStatsAttackLabel, *mStatsDefenseLabel; - gcn::Label *mStatsMagicAttackLabel, *mStatsMagicDefenseLabel; - gcn::Label *mStatsAccuracyLabel, *mStatsEvadeLabel; - gcn::Label *mStatsReflexLabel; - - gcn::Label *mStatsAttackPoints, *mStatsDefensePoints; - gcn::Label *mStatsMagicAttackPoints, *mStatsMagicDefensePoints; - gcn::Label *mStatsAccuracyPoints, *mStatsEvadePoints; - gcn::Label *mStatsReflexPoints; -*/ - /** - * Stats captions. - */ - gcn::Label *mStatsLabel[6]; - gcn::Label *mStatsDisplayLabel[6]; - gcn::Label *mCharacterPointsLabel; - gcn::Label *mCorrectionPointsLabel; +#ifdef EATHENA_SUPPORT + gcn::Label *mJobLvlLabel, *mJobLabel; + ProgressBar *mJobBar; +#endif - /** - * Stats buttons. - */ - gcn::Button *mStatsPlus[6]; - gcn::Button *mStatsMinus[6]; + VertContainer *mAttrCont; + ScrollArea *mAttrScroll; + VertContainer *mDAttrCont; + ScrollArea *mDAttrScroll; + + gcn::Label *mCharacterPointsLabel, *mCorrectionPointsLabel; + + typedef std::map<int, AttrDisplay*> Attrs; + Attrs mAttrs; }; extern StatusWindow *statusWindow; |