diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-19 15:09:27 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-19 15:09:27 +0000 |
commit | 3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6 (patch) | |
tree | 5084eaa47d4874a3a573de226f19c4be072e4888 /src/gui/debugwindow.cpp | |
parent | 19d5cc3a6bbbd911361b7e8b956840d0189d4c2b (diff) | |
download | mana-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.tar.gz mana-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.tar.bz2 mana-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.tar.xz mana-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.zip |
Reverted changeset r2269 (toString) as requested by ElvenProgrammer.
Diffstat (limited to 'src/gui/debugwindow.cpp')
-rw-r--r-- | src/gui/debugwindow.cpp | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp index 66681a8b..cf30df93 100644 --- a/src/gui/debugwindow.cpp +++ b/src/gui/debugwindow.cpp @@ -23,9 +23,9 @@ #include "debugwindow.h" -#include <SDL_mouse.h> - #include <guichan/widgets/label.hpp> +#include <sstream> +#include <SDL_mouse.h> #include "button.h" @@ -33,8 +33,6 @@ #include "../engine.h" #include "../map.h" -#include "../utils/tostring.h" - DebugWindow::DebugWindow(): Window("Debug") { @@ -75,24 +73,29 @@ DebugWindow::logic() int mouseTileX = mouseX / 32 + camera_x; int mouseTileY = mouseY / 32 + camera_y; - mFPSLabel->setCaption("[" + toString(fps) + " FPS"); + std::stringstream updatedText; + updatedText << "[" << fps << " FPS]"; + mFPSLabel->setCaption(updatedText.str()); mFPSLabel->adjustSize(); - mTileMouseLabel->setCaption("[Mouse: " + - toString(mouseTileX) + ", " + toString(mouseTileY) + "]"); + updatedText.str(""); + updatedText << "[Mouse: " << mouseTileX << ", " << mouseTileY << "]"; + mTileMouseLabel->setCaption(updatedText.str()); mTileMouseLabel->adjustSize(); - Map *currentMap = engine->getCurrentMap(); - if (currentMap != NULL) + updatedText.str(""); + mCurrentMap = engine->getCurrentMap(); + + if (mCurrentMap != NULL) { - const std::string music = - " [Music File: " + currentMap->getProperty("music") + "]"; - mMusicFileLabel->setCaption(music); + updatedText << " [Music File: " + << mCurrentMap->getProperty("music") << "]"; + mMusicFileLabel->setCaption(updatedText.str()); mMusicFileLabel->adjustSize(); - - const std::string minimap = - " [MiniMap File: " + currentMap->getProperty("minimap") + "]"; - mMapFileLabel->setCaption(minimap); + updatedText.str(""); + updatedText << " [MiniMap File: " + << mCurrentMap->getProperty("minimap") << "]"; + mMapFileLabel->setCaption(updatedText.str()); mMapFileLabel->adjustSize(); } } |