summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/debugwindow.cpp35
-rw-r--r--src/gui/debugwindow.h2
-rw-r--r--src/resources/mapreader.cpp2
3 files changed, 25 insertions, 14 deletions
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp
index 63f4762a..b97474af 100644
--- a/src/gui/debugwindow.cpp
+++ b/src/gui/debugwindow.cpp
@@ -42,27 +42,31 @@ DebugWindow::DebugWindow():
setResizable(true);
setCloseButton(true);
- setDefaultSize(0, 0, 400, 100);
+ setDefaultSize(0, 0, 400, 60);
loadWindowState();
mFPSLabel = new gcn::Label("[0 FPS]");
mFPSLabel->setPosition(0,0);
- mMusicFileLabel = new gcn::Label("Music File: ");
- mMusicFileLabel->setPosition(0, 20);
+ mMusicFileLabel = new gcn::Label("Music: ");
+ mMusicFileLabel->setPosition(0, 15);
- mMapFileLabel = new gcn::Label("Mini-Map File: ");
- mMapFileLabel->setPosition(0, 40);
+ mMapLabel = new gcn::Label("Map: ");
+ mMapLabel->setPosition(0, 30);
+
+ mMiniMapLabel = new gcn::Label("Mini-Map: ");
+ mMiniMapLabel->setPosition(0, 45);
mTileMouseLabel = new gcn::Label("[Mouse: 0, 0]");
- mTileMouseLabel->setPosition(100, 0);
+ mTileMouseLabel->setPosition(200, 0);
mParticleCountLabel = new gcn::Label("[Particle count: 0]");
- mParticleCountLabel->setPosition(100, 60);
+ mParticleCountLabel->setPosition(200, 15);
add(mFPSLabel);
add(mMusicFileLabel);
- add(mMapFileLabel);
+ add(mMiniMapLabel);
+ add(mMapLabel);
add(mTileMouseLabel);
add(mParticleCountLabel);
}
@@ -75,7 +79,7 @@ void DebugWindow::logic()
int mouseTileX = mouseX / 32 + viewport->getCameraX();
int mouseTileY = mouseY / 32 + viewport->getCameraY();
- mFPSLabel->setCaption("[" + toString(fps) + " FPS");
+ mFPSLabel->setCaption("[" + toString(fps) + " FPS]");
mFPSLabel->adjustSize();
mTileMouseLabel->setCaption("[Mouse: " +
@@ -86,14 +90,19 @@ void DebugWindow::logic()
if (currentMap != NULL)
{
const std::string music =
- " [Music File: " + currentMap->getProperty("music") + "]";
+ " [Music: " + currentMap->getProperty("music") + "]";
mMusicFileLabel->setCaption(music);
mMusicFileLabel->adjustSize();
const std::string minimap =
- " [MiniMap File: " + currentMap->getProperty("minimap") + "]";
- mMapFileLabel->setCaption(minimap);
- mMapFileLabel->adjustSize();
+ " [MiniMap: " + currentMap->getProperty("minimap") + "]";
+ mMiniMapLabel->setCaption(minimap);
+ mMiniMapLabel->adjustSize();
+
+ const std::string map =
+ " [Map: " + currentMap->getProperty("_filename") + "]";
+ mMapLabel->setCaption(map);
+ mMapLabel->adjustSize();
}
mParticleCountLabel->setCaption("[Particle count: " +
diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h
index ae1d8b14..8d8b7822 100644
--- a/src/gui/debugwindow.h
+++ b/src/gui/debugwindow.h
@@ -49,7 +49,7 @@ class DebugWindow : public Window
void logic();
private:
- gcn::Label *mMusicFileLabel, *mMapFileLabel;
+ gcn::Label *mMusicFileLabel, *mMapLabel, *mMiniMapLabel;
gcn::Label *mTileMouseLabel, *mFPSLabel;
gcn::Label *mParticleCountLabel;
};
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 802199f1..0082a024 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -194,6 +194,8 @@ Map *MapReader::readMap(const std::string &filename)
logger->log("Error while parsing map file (%s)!", filename.c_str());
}
+ if (map) map->setProperty("_filename", filename);
+
return map;
}