diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-02-13 20:04:03 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-13 20:04:03 +0200 |
commit | 932ca64763d5133c4e5d8f6f6d7ed0d582d0456e (patch) | |
tree | 68de441cebab14f15514f5798504565529a773ff /src/gui/statuswindow.cpp | |
parent | 3aba05585b85989b5d0927939812f612c3b0d4d9 (diff) | |
download | manaverse-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.cpp | 20 |
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; |