summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/debugwindowtabs.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-03-04 02:38:36 +0300
committerAndrei Karas <akaras@inbox.ru>2018-03-04 02:38:36 +0300
commita698e2e44e3dfa157c2b184a184db204b44a6a30 (patch)
tree66876f11a3e80e5bfab69cfd4ce17ed2a59df896 /src/gui/widgets/tabs/debugwindowtabs.cpp
parent44ef6547161dd3cd2e1bb4053bb5e8619e6dc0d0 (diff)
downloadplus-a698e2e44e3dfa157c2b184a184db204b44a6a30.tar.gz
plus-a698e2e44e3dfa157c2b184a184db204b44a6a30.tar.bz2
plus-a698e2e44e3dfa157c2b184a184db204b44a6a30.tar.xz
plus-a698e2e44e3dfa157c2b184a184db204b44a6a30.zip
Show current atlases count in debug window.
If use too many images, atlase can be split to more than one. And this is performance issue.
Diffstat (limited to 'src/gui/widgets/tabs/debugwindowtabs.cpp')
-rw-r--r--src/gui/widgets/tabs/debugwindowtabs.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/widgets/tabs/debugwindowtabs.cpp b/src/gui/widgets/tabs/debugwindowtabs.cpp
index 5a6485dca..e3d7d7498 100644
--- a/src/gui/widgets/tabs/debugwindowtabs.cpp
+++ b/src/gui/widgets/tabs/debugwindowtabs.cpp
@@ -67,6 +67,9 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
mMapActorCountLabel(new Label(this, strprintf("%s %d",
// TRANSLATORS: debug window label
_("Map actors count:"), 88888))),
+ mMapAtlasCountLabel(new Label(this, strprintf("%s %d",
+ // TRANSLATORS: debug window label
+ _("Map atlas count:"), 88888))),
// TRANSLATORS: debug window label
mXYLabel(new Label(this, strprintf("%s (?,?)", _("Player Position:")))),
mTexturesLabel(nullptr),
@@ -141,6 +144,7 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
place(0, 7, mTileMouseLabel, 2, 1);
place(0, 8, mParticleCountLabel, 2, 1);
place(0, 9, mMapActorCountLabel, 2, 1);
+ place(0, 10, mMapAtlasCountLabel, 2, 1);
#ifdef USE_OPENGL
#if defined (DEBUG_OPENGL_LEAKS) || defined(DEBUG_DRAW_CALLS) \
|| defined(DEBUG_BIND_TEXTURE)
@@ -221,6 +225,10 @@ void MapDebugTab::logic()
// TRANSLATORS: debug window label
strprintf("%s %d", _("Map actors count:"),
map->getActorsCount()));
+ mMapAtlasCountLabel->setCaption(
+ // TRANSLATORS: debug window label
+ strprintf("%s %d", _("Map atlas count:"),
+ map->getAtlasCount()));
#ifdef USE_OPENGL
#ifdef DEBUG_OPENGL_LEAKS
mTexturesLabel->setCaption(strprintf("%s %d",
@@ -258,13 +266,16 @@ void MapDebugTab::logic()
mMapLabel->setCaption(strprintf("%s ?", _("Map:")));
// TRANSLATORS: debug window label
mMapNameLabel->setCaption(strprintf("%s ?", _("Map name:")));
-
mMapActorCountLabel->setCaption(
// TRANSLATORS: debug window label
strprintf("%s ?", _("Map actors count:")));
+ mMapAtlasCountLabel->setCaption(
+ // TRANSLATORS: debug window label
+ strprintf("%s ?", _("Map atlas count:")));
}
mMapActorCountLabel->adjustSize();
+ mMapAtlasCountLabel->adjustSize();
mParticleCountLabel->adjustSize();
mFPSLabel->setCaption(strprintf(mFPSText.c_str(), fps));