summaryrefslogtreecommitdiff
path: root/src/gui/windows/inventorywindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-11 19:28:57 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-11 19:28:57 +0300
commit87c59212f8590a8dd72fac3e320fcb2ada781355 (patch)
tree198d627c44f1164140659827a5c782d30bec375b /src/gui/windows/inventorywindow.cpp
parent02e91411eb9961e95f856bd717d6ca0d8ec0e435 (diff)
downloadplus-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.gz
plus-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.bz2
plus-87c59212f8590a8dd72fac3e320fcb2ada781355.tar.xz
plus-87c59212f8590a8dd72fac3e320fcb2ada781355.zip
Move player attributes into separate file.
Diffstat (limited to 'src/gui/windows/inventorywindow.cpp')
-rw-r--r--src/gui/windows/inventorywindow.cpp9
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();
}