From 98db053ae7fa09a8b209dca95e4e65d00320cc0b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 30 Jun 2016 15:08:36 +0300 Subject: Move extended stats from status window into stats.xml too. Also add reports about failed stats loading. --- src/gui/windows/statuswindow.cpp | 16 +++++++++++++--- src/gui/windows/statuswindow.h | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'src/gui') 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 &stats = StatDb::getExtraStats(); - FOR_EACH (std::vector::const_iterator, it, stats) + clearAttributes(); + + const std::vector &basicStats = StatDb::getBasicStats(); + FOR_EACH (std::vector::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 &extendedStats = StatDb::getExtendedStats(); + FOR_EACH (std::vector::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); -- cgit v1.2.3-70-g09d2