summaryrefslogtreecommitdiff
path: root/src/gui/statuswindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-13 20:04:03 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-13 20:04:03 +0200
commit932ca64763d5133c4e5d8f6f6d7ed0d582d0456e (patch)
tree68de441cebab14f15514f5798504565529a773ff /src/gui/statuswindow.cpp
parent3aba05585b85989b5d0927939812f612c3b0d4d9 (diff)
downloadmanaverse-932ca64763d5133c4e5d8f6f6d7ed0d582d0456e.tar.gz
manaverse-932ca64763d5133c4e5d8f6f6d7ed0d582d0456e.tar.bz2
manaverse-932ca64763d5133c4e5d8f6f6d7ed0d582d0456e.tar.xz
manaverse-932ca64763d5133c4e5d8f6f6d7ed0d582d0456e.zip
Add arrows bar.
Diffstat (limited to 'src/gui/statuswindow.cpp')
-rw-r--r--src/gui/statuswindow.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index ffc00db5a..f37b9737a 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -23,12 +23,15 @@
#include "configuration.h"
#include "event.h"
+#include "equipment.h"
#include "inventory.h"
+#include "item.h"
#include "localplayer.h"
#include "playerinfo.h"
#include "units.h"
#include "viewport.h"
+#include "gui/equipmentwindow.h"
#include "gui/setup.h"
#include "gui/theme.h"
@@ -567,8 +570,25 @@ void StatusWindow::updateMoneyBar(ProgressBar *bar)
}
}
+void StatusWindow::updateArrowsBar(ProgressBar *bar)
+{
+ if (!bar || !equipmentWindow)
+ return;
+
+ Item *item = equipmentWindow->getEquipment(
+ Equipment::EQUIP_PROJECTILE_SLOT);
+
+ if (item && item->getQuantity() > 0)
+ bar->setText(toString(item->getQuantity()));
+ else
+ bar->setText("0");
+}
+
void StatusWindow::updateInvSlotsBar(ProgressBar *bar)
{
+ if (!bar)
+ return;
+
Inventory *inv = PlayerInfo::getInventory();
if (!inv)
return;