diff options
author | Ira Rice <irarice@gmail.com> | 2009-01-20 20:32:33 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-20 20:48:19 +0100 |
commit | 00cae99069c186ec4688e667a255a215235640a3 (patch) | |
tree | 6bf2206ac41f6f844324e374a70d115b27df4a94 /src/gui/debugwindow.cpp | |
parent | b032adccbc64ebe316c72c7b541d7edf61f27ef5 (diff) | |
download | mana-00cae99069c186ec4688e667a255a215235640a3.tar.gz mana-00cae99069c186ec4688e667a255a215235640a3.tar.bz2 mana-00cae99069c186ec4688e667a255a215235640a3.tar.xz mana-00cae99069c186ec4688e667a255a215235640a3.zip |
Fixed overlaps in the last commit by converting the debug window code to
use the layout engine.
Signed-off-by: Ira Rice <irarice@gmail.com>
(cherry picked from Aethyra commit fa007dafa2c499425e7112095cbda9c2ff5ea20c)
Conflicts:
src/gui/debugwindow.cpp
Diffstat (limited to 'src/gui/debugwindow.cpp')
-rw-r--r-- | src/gui/debugwindow.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp index 1509aa8b..e0b25f75 100644 --- a/src/gui/debugwindow.cpp +++ b/src/gui/debugwindow.cpp @@ -29,8 +29,10 @@ #include "gui.h" #include "viewport.h" -#include "../game.h" +#include "widgets/layout.h" + #include "../engine.h" +#include "../game.h" #include "../particle.h" #include "../map.h" @@ -47,33 +49,28 @@ DebugWindow::DebugWindow(): loadWindowState(); mFPSLabel = new gcn::Label("[0 FPS]"); - mFPSLabel->setPosition(0,0); mMusicFileLabel = new gcn::Label("Music: "); - mMusicFileLabel->setPosition(0, 15); 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(200, 0); mParticleCountLabel = new gcn::Label("[Particle count: 0]"); - mParticleCountLabel->setPosition(200, 15); - - add(mFPSLabel); - add(mMusicFileLabel); - add(mMiniMapLabel); - add(mMapLabel); - add(mTileMouseLabel); - add(mParticleCountLabel); + + place(0, 0, mFPSLabel); + place(3, 0, mTileMouseLabel); + place(0, 1, mMusicFileLabel, 2); + place(3, 1, mParticleCountLabel); + place(0, 2, mMapLabel, 2); + place(0, 3, mMiniMapLabel, 2); + + reflowLayout(375, 0); } -void -DebugWindow::logic() +void DebugWindow::logic() { // Get the current mouse position int mouseX, mouseY; |