summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-09-07 01:02:41 +0300
committerAndrei Karas <akaras@inbox.ru>2018-09-07 01:02:41 +0300
commitabfc18794cbd9119c110f32e39ea48a00e5b9214 (patch)
tree5a1cbe3cb321eecda56e2f4b4498019a96eb4b0a /src/gui/windows
parentfea2f27179d17bbba96873ea0eeae99df20a457c (diff)
downloadplus-abfc18794cbd9119c110f32e39ea48a00e5b9214.tar.gz
plus-abfc18794cbd9119c110f32e39ea48a00e5b9214.tar.bz2
plus-abfc18794cbd9119c110f32e39ea48a00e5b9214.tar.xz
plus-abfc18794cbd9119c110f32e39ea48a00e5b9214.zip
Add stats tab into debug window. Move LPS counter into stats tab.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/debugwindow.cpp11
-rw-r--r--src/gui/windows/debugwindow.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/windows/debugwindow.cpp b/src/gui/windows/debugwindow.cpp
index 958a5428a..35d114ede 100644
--- a/src/gui/windows/debugwindow.cpp
+++ b/src/gui/windows/debugwindow.cpp
@@ -31,6 +31,7 @@
#include "gui/widgets/tabs/mapdebugtab.h"
#include "gui/widgets/tabs/netdebugtab.h"
+#include "gui/widgets/tabs/statdebugtab.h"
#include "gui/widgets/tabs/targetdebugtab.h"
#include "utils/delete2.h"
@@ -46,7 +47,8 @@ DebugWindow::DebugWindow(const std::string &name) :
mTabs(CREATEWIDGETR(TabbedArea, this)),
mMapWidget(new MapDebugTab(this)),
mTargetWidget(new TargetDebugTab(this)),
- mNetWidget(new NetDebugTab(this))
+ mNetWidget(new NetDebugTab(this)),
+ mStatWidget(new StatDebugTab(this))
{
setWindowName(name);
if (setupWindow != nullptr)
@@ -68,6 +70,8 @@ DebugWindow::DebugWindow(const std::string &name) :
mTabs->addTab(std::string(_("Target")), mTargetWidget);
// TRANSLATORS: debug window tab
mTabs->addTab(std::string(_("Net")), mNetWidget);
+ // TRANSLATORS: debug window tab
+ mTabs->addTab(std::string(_("Stat")), mStatWidget);
mTabs->setDimension(Rect(0, 0, 600, 300));
@@ -76,6 +80,7 @@ DebugWindow::DebugWindow(const std::string &name) :
mMapWidget->resize(w, h);
mTargetWidget->resize(w, h);
mNetWidget->resize(w, h);
+ mStatWidget->resize(w, h);
loadWindowState();
enableVisibleSound(true);
}
@@ -85,6 +90,7 @@ DebugWindow::~DebugWindow()
delete2(mMapWidget);
delete2(mTargetWidget);
delete2(mNetWidget);
+ delete2(mStatWidget);
}
void DebugWindow::postInit()
@@ -114,6 +120,9 @@ void DebugWindow::slowLogic()
case 2:
mNetWidget->logic();
break;
+ case 3:
+ mStatWidget->logic();
+ break;
}
if (localPlayer != nullptr)
diff --git a/src/gui/windows/debugwindow.h b/src/gui/windows/debugwindow.h
index 00862ffb6..1f4de118a 100644
--- a/src/gui/windows/debugwindow.h
+++ b/src/gui/windows/debugwindow.h
@@ -27,6 +27,7 @@
class MapDebugTab;
class NetDebugTab;
+class StatDebugTab;
class TabbedArea;
class TargetDebugTab;
@@ -71,6 +72,7 @@ class DebugWindow final : public Window
MapDebugTab *mMapWidget A_NONNULLPOINTER;
TargetDebugTab *mTargetWidget A_NONNULLPOINTER;
NetDebugTab *mNetWidget A_NONNULLPOINTER;
+ StatDebugTab *mStatWidget A_NONNULLPOINTER;
};
extern DebugWindow *debugWindow;