summaryrefslogtreecommitdiff
path: root/src/gui/ministatus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/ministatus.cpp')
-rw-r--r--src/gui/ministatus.cpp11
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)