diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-30 15:08:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-30 15:08:36 +0300 |
commit | 98db053ae7fa09a8b209dca95e4e65d00320cc0b (patch) | |
tree | b57a5aaa669a20f0e43f4be698ef3204ed56c0fb /src/gui | |
parent | 3589bb9fa0800650accc124ea6820d5834c27e43 (diff) | |
download | plus-98db053ae7fa09a8b209dca95e4e65d00320cc0b.tar.gz plus-98db053ae7fa09a8b209dca95e4e65d00320cc0b.tar.bz2 plus-98db053ae7fa09a8b209dca95e4e65d00320cc0b.tar.xz plus-98db053ae7fa09a8b209dca95e4e65d00320cc0b.zip |
Move extended stats from status window into stats.xml too.s20160630
Also add reports about failed stats loading.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 16 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.h | 2 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index f4ca38195..60aab8ca3 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -230,10 +230,12 @@ StatusWindow::StatusWindow() : updateLevelLabel(); } -void StatusWindow::addBasicAttributes() +void StatusWindow::addAttributes() { - const std::vector<BasicStat> &stats = StatDb::getExtraStats(); - FOR_EACH (std::vector<BasicStat>::const_iterator, it, stats) + clearAttributes(); + + const std::vector<BasicStat> &basicStats = StatDb::getBasicStats(); + FOR_EACH (std::vector<BasicStat>::const_iterator, it, basicStats) { const BasicStat &stat = *it; addAttribute(stat.attr, @@ -241,6 +243,14 @@ void StatusWindow::addBasicAttributes() stat.tag, Modifiable_true); } + + const std::vector<BasicStat> &extendedStats = StatDb::getExtendedStats(); + FOR_EACH (std::vector<BasicStat>::const_iterator, it, extendedStats) + { + const BasicStat &stat = *it; + addAttribute(stat.attr, + stat.name); + } } void StatusWindow::updateLevelLabel() diff --git a/src/gui/windows/statuswindow.h b/src/gui/windows/statuswindow.h index a11ea62b4..539c23a39 100644 --- a/src/gui/windows/statuswindow.h +++ b/src/gui/windows/statuswindow.h @@ -99,7 +99,7 @@ class StatusWindow final : public Window, void updateLevelLabel(); - void addBasicAttributes(); + void addAttributes(); private: static std::string translateLetter(const char *const letters); |