summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/equipmentwindow.cpp7
-rw-r--r--src/gui/windows/statuswindow.cpp5
2 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index e37d623d6..a78052404 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -53,11 +53,13 @@
#include "utils/dtor.h"
#include "utils/gettext.h"
+#include "net/inventoryhandler.h"
+
#include "debug.h"
EquipmentWindow *equipmentWindow = nullptr;
EquipmentWindow *beingEquipmentWindow = nullptr;
-static const int BOX_COUNT = 22;
+static const int BOX_COUNT = 27;
std::map<std::string, int> EquipmentWindow::mSlotNames;
EquipmentWindow::EquipmentWindow(Equipment *const equipment,
@@ -241,6 +243,7 @@ void EquipmentWindow::draw(Graphics *graphics)
}
i = 0;
+ const int projSlot = inventoryHandler->getProjectileSlot();
for (std::vector<EquipmentBox*>::const_iterator it = boxes.begin(),
it_end = boxes.end(); it != it_end; ++ it, ++ i)
{
@@ -258,7 +261,7 @@ void EquipmentWindow::draw(Graphics *graphics)
// with maximum opacity
graphics->drawImage(image, box->x + mItemPadding,
box->y + mItemPadding);
- if (i == ItemSlot::PROJECTILE_SLOT)
+ if (i == projSlot)
{
graphics->setColorAll(mLabelsColor, mLabelsColor2);
const std::string str = toString(item->getQuantity());
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 9d979f27f..8803654c8 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -50,8 +50,9 @@
#include "gui/widgets/vertcontainer.h"
#include "gui/widgets/windowcontainer.h"
-#include "net/playerhandler.h"
#include "net/gamehandler.h"
+#include "net/inventoryhandler.h"
+#include "net/playerhandler.h"
#include "utils/delete2.h"
#include "utils/gettext.h"
@@ -585,7 +586,7 @@ void StatusWindow::updateArrowsBar(ProgressBar *const bar)
return;
const Item *const item = equipmentWindow->getEquipment(
- Equipment::EQUIP_PROJECTILE_SLOT);
+ inventoryHandler->getProjectileSlot());
if (item && item->getQuantity() > 0)
bar->setText(toString(item->getQuantity()));