diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-11 19:28:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-11 19:28:57 +0300 |
commit | 87c59212f8590a8dd72fac3e320fcb2ada781355 (patch) | |
tree | 198d627c44f1164140659827a5c782d30bec375b /src/gui/windows/inventorywindow.cpp | |
parent | 02e91411eb9961e95f856bd717d6ca0d8ec0e435 (diff) | |
download | manaplus-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.gz manaplus-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.bz2 manaplus-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.xz manaplus-87c59212f8590a8dd72fac3e320fcb2ada781355.zip |
Move player attributes into separate file.
Diffstat (limited to 'src/gui/windows/inventorywindow.cpp')
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 2122fce2f..cf48e4fd1 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -26,6 +26,7 @@ #include "item.h" #include "units.h" +#include "being/attributes.h" #include "being/playerinfo.h" #include "events/keyevent.h" @@ -566,7 +567,7 @@ void InventoryWindow::mouseMoved(MouseEvent &event) const Rect &rect = mDimension; mTextPopup->show(rect.x + x, rect.y + y, strprintf(_("Money: %s"), Units::formatCurrency(PlayerInfo::getAttribute( - PlayerInfo::MONEY)).c_str())); + Attributes::MONEY)).c_str())); } else { @@ -694,8 +695,8 @@ void InventoryWindow::updateWeight() if (!isMainInventory() || !mWeightBar) return; - const int total = PlayerInfo::getAttribute(PlayerInfo::TOTAL_WEIGHT); - const int max = PlayerInfo::getAttribute(PlayerInfo::MAX_WEIGHT); + const int total = PlayerInfo::getAttribute(Attributes::TOTAL_WEIGHT); + const int max = PlayerInfo::getAttribute(Attributes::MAX_WEIGHT); if (max <= 0) return; @@ -814,6 +815,6 @@ void InventoryWindow::attributeChanged(const int id, const int oldVal A_UNUSED, const int newVal A_UNUSED) { - if (id == PlayerInfo::TOTAL_WEIGHT || id == PlayerInfo::MAX_WEIGHT) + if (id == Attributes::TOTAL_WEIGHT || id == Attributes::MAX_WEIGHT) updateWeight(); } |