diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-18 14:47:14 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-18 14:47:14 +0000 |
commit | ab678324e3d73e2354cef331624ecef7cfc03203 (patch) | |
tree | 29394a5aca6e59f817f7cfa3b9281891a273d259 /src/gui/ministatus.cpp | |
parent | 32badd4b6f843cb74fdc3238fe92119518c8c0ab (diff) | |
download | mana-ab678324e3d73e2354cef331624ecef7cfc03203.tar.gz mana-ab678324e3d73e2354cef331624ecef7cfc03203.tar.bz2 mana-ab678324e3d73e2354cef331624ecef7cfc03203.tar.xz mana-ab678324e3d73e2354cef331624ecef7cfc03203.zip |
Added a toString conversion function.
Diffstat (limited to 'src/gui/ministatus.cpp')
-rw-r--r-- | src/gui/ministatus.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp index fc2f451b..be089b68 100644 --- a/src/gui/ministatus.cpp +++ b/src/gui/ministatus.cpp @@ -24,13 +24,14 @@ #include "ministatus.h" #include <guichan/widgets/label.hpp> -#include <sstream> #include "gui.h" #include "progressbar.h" #include "../localplayer.h" +#include "../utils/tostring.h" + MiniStatusWindow::MiniStatusWindow(): Window("") { @@ -88,12 +89,8 @@ void MiniStatusWindow::update() // mpBar->setProgress((float)player_node->mp / (float)player_node->maxMp); // Update and center labels - std::stringstream updatedText; - updatedText << player_node->mHp; - mHpLabel->setCaption(updatedText.str()); - updatedText.str(""); - updatedText << player_node->mMp; - mMpLabel->setCaption(updatedText.str()); + mHpLabel->setCaption(toString(player_node->mHp)); + mMpLabel->setCaption(toString(player_node->mMp)); } void MiniStatusWindow::draw(gcn::Graphics *graphics) |