diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-07-26 22:47:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-07-26 22:47:45 +0300 |
commit | 83981f76348655507d225aca220893e668b09bdc (patch) | |
tree | a86b9a28bb584bed5a6f397bc0b47aba908d0f82 /src/gui/windows | |
parent | 8f3d5cce14912a4c955a02f50a13130ca15b585e (diff) | |
download | ManaVerse-83981f76348655507d225aca220893e668b09bdc.tar.gz ManaVerse-83981f76348655507d225aca220893e668b09bdc.tar.bz2 ManaVerse-83981f76348655507d225aca220893e668b09bdc.tar.xz ManaVerse-83981f76348655507d225aca220893e668b09bdc.zip |
Add support for loading stats pages from stats.xml
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 461d5e01d..57ca97206 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -48,6 +48,8 @@ #include "net/inventoryhandler.h" #include "net/playerhandler.h" +#include "resources/db/statdb.h" + #include "resources/item/item.h" #include "utils/gettext.h" @@ -213,15 +215,18 @@ void StatusWindow::addTabs() { // TRANSLATORS: status window tab name addTabBasic(_("Basic")); - // TRANSLATORS: status window tab name - addTab(_("Extended")); + const std::vector<std::string> &pages = StatDb::getPages(); + FOR_EACH(std::vector<std::string>::const_iterator, it, pages) + { + addTab(*it); + } mTabs->adjustSize(); } void StatusWindow::addTab(const std::string &name) { mTabs->addTab(name, - new StatsPage(this)); + new StatsPage(this, name)); } void StatusWindow::addTabBasic(const std::string &name) |