diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/stats.cpp | 7 | ||||
-rw-r--r-- | src/gui/stats.h | 7 | ||||
-rw-r--r-- | src/gui/status.cpp | 7 | ||||
-rw-r--r-- | src/gui/status.h | 7 |
4 files changed, 26 insertions, 2 deletions
diff --git a/src/gui/stats.cpp b/src/gui/stats.cpp index c5afe82d..f03d2bfc 100644 --- a/src/gui/stats.cpp +++ b/src/gui/stats.cpp @@ -142,6 +142,13 @@ StatsWindow::~StatsWindow() { delete remainingStatsPointsLabel; } +void StatsWindow::draw(gcn::Graphics *graphics) +{ + update(); + + Window::draw(graphics); +} + void StatsWindow::action(const std::string& eventId) { WFIFOW(0) = net_w_value(0x00bb); diff --git a/src/gui/stats.h b/src/gui/stats.h index 54bd892b..3d7d0f52 100644 --- a/src/gui/stats.h +++ b/src/gui/stats.h @@ -53,11 +53,16 @@ class StatsWindow : public Window, public gcn::ActionListener { void action(const std::string& eventId); /** + * Draw this window + */ + void draw(gcn::Graphics *graphics); + + private: + /** * Updates stats in window. */ void update(); - private: int i; /** diff --git a/src/gui/status.cpp b/src/gui/status.cpp index c903261c..7ba14fc7 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -206,6 +206,13 @@ void StatusWindow::update() delete[] tempstr; } +void StatusWindow::draw(gcn::Graphics *graphics) +{ + update(); + + Window::draw(graphics); +} + void StatusWindow::action(const std::string& eventId) { if (eventId == "Stats") { diff --git a/src/gui/status.h b/src/gui/status.h index 7ef57ed9..45ccb75d 100644 --- a/src/gui/status.h +++ b/src/gui/status.h @@ -56,11 +56,16 @@ class StatusWindow : public Window, public gcn::ActionListener { void action(const std::string& eventId); /** + * Draw this window + */ + void draw(gcn::Graphics *graphics); + + private: + /** * Updates this dialog with values from PLAYER_INFO *char_info */ void update(); - private: gcn::Label *hp, *sp; gcn::Label *hpValue, *spValue; gcn::Label *expLabel, *jobExpLabel; |