diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/debugwindow.cpp | 21 | ||||
-rw-r--r-- | src/gui/debugwindow.h | 1 | ||||
-rw-r--r-- | src/gui/setup_video.cpp | 4 |
3 files changed, 8 insertions, 18 deletions
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp index 2b5616cb..f4f2fd14 100644 --- a/src/gui/debugwindow.cpp +++ b/src/gui/debugwindow.cpp @@ -21,7 +21,6 @@ #include "gui/debugwindow.h" -#include "engine.h" #include "game.h" #include "particle.h" #include "main.h" @@ -93,24 +92,16 @@ void DebugWindow::logic() mFPSLabel->setCaption(strprintf(mFPSText.c_str(), fps)); - mTileMouseLabel->setCaption(strprintf(_("Cursor: (%d, %d)"), mouseTileX, + mTileMouseLabel->setCaption(strprintf(_("Cursor: (%d, %d)"), + mouseTileX, mouseTileY)); - Map *currentMap = engine->getCurrentMap(); - if (currentMap) + if (const Map *map = Game::instance()->getCurrentMap()) { // TODO: Add gettext support below - const std::string music = - "Music: " + currentMap->getProperty("music"); - mMusicFileLabel->setCaption(music); - - const std::string minimap = - "Minimap: " + currentMap->getProperty("minimap"); - mMinimapLabel->setCaption(minimap); - - const std::string map = - "Map: " + currentMap->getProperty("_filename"); - mMapLabel->setCaption(map); + mMusicFileLabel->setCaption("Music: " + map->getProperty("music")); + mMinimapLabel->setCaption("Minimap: " + map->getProperty("minimap")); + mMapLabel->setCaption("Map: " + map->getProperty("_filename")); } mParticleCountLabel->setCaption(strprintf(_("Particle count: %d"), diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h index 50a5fc06..1ef32e02 100644 --- a/src/gui/debugwindow.h +++ b/src/gui/debugwindow.h @@ -50,7 +50,6 @@ class DebugWindow : public Window Label *mParticleCountLabel, *mParticleDetailLabel; Label *mAmbientDetailLabel; - std::string mFPSText; }; diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index aaa3ea35..f5bff9ba 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -22,7 +22,7 @@ #include "gui/setup_video.h" #include "configuration.h" -#include "engine.h" +#include "game.h" #include "graphics.h" #include "localplayer.h" #include "log.h" @@ -502,7 +502,7 @@ void Setup_Video::action(const gcn::ActionEvent &event) mParticleEffectsCheckBox->isSelected()); Particle::enabled = mParticleEffectsCheckBox->isSelected(); - if (engine) + if (Game::instance()) { new OkDialog(_("Particle Effect Settings Changed."), _("Changes will take effect on map change.")); |