summaryrefslogtreecommitdiffstats
path: root/src/UI
diff options
context:
space:
mode:
authorPablo Beltrán <spekdrum@gmail.com>2017-05-24 08:09:58 +0200
committerMattes D <github@xoft.cz>2017-05-24 08:09:58 +0200
commit84bdba345d9b34a59337009d0880aa74d3b2d689 (patch)
treeb9b4e5580591c94d23e0ac0de6ce9e980101c6ef /src/UI
parentStore cChunk::m_BlockEntities in a map (#3717) (diff)
downloadcuberite-84bdba345d9b34a59337009d0880aa74d3b2d689.tar
cuberite-84bdba345d9b34a59337009d0880aa74d3b2d689.tar.gz
cuberite-84bdba345d9b34a59337009d0880aa74d3b2d689.tar.bz2
cuberite-84bdba345d9b34a59337009d0880aa74d3b2d689.tar.lz
cuberite-84bdba345d9b34a59337009d0880aa74d3b2d689.tar.xz
cuberite-84bdba345d9b34a59337009d0880aa74d3b2d689.tar.zst
cuberite-84bdba345d9b34a59337009d0880aa74d3b2d689.zip
Diffstat (limited to 'src/UI')
-rw-r--r--src/UI/InventoryWindow.cpp1
-rw-r--r--src/UI/SlotArea.h17
2 files changed, 18 insertions, 0 deletions
diff --git a/src/UI/InventoryWindow.cpp b/src/UI/InventoryWindow.cpp
index 0f876e559..571651d20 100644
--- a/src/UI/InventoryWindow.cpp
+++ b/src/UI/InventoryWindow.cpp
@@ -19,6 +19,7 @@ cInventoryWindow::cInventoryWindow(cPlayer & a_Player) :
m_SlotAreas.push_back(new cSlotAreaArmor(*this));
m_SlotAreas.push_back(new cSlotAreaInventory(*this));
m_SlotAreas.push_back(new cSlotAreaHotBar(*this));
+ m_SlotAreas.push_back(new cSlotAreaShield(*this));
}
diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h
index 005ba6e7f..5a94a26af 100644
--- a/src/UI/SlotArea.h
+++ b/src/UI/SlotArea.h
@@ -145,6 +145,23 @@ public:
+/** Handles the shield of each player */
+class cSlotAreaShield :
+ public cSlotAreaInventoryBase
+{
+ typedef cSlotAreaInventoryBase super;
+
+public:
+ cSlotAreaShield(cWindow & a_ParentWindow) :
+ cSlotAreaInventoryBase(cInventory::invShieldCount, cInventory::invShieldOffset, a_ParentWindow)
+ {
+ }
+};
+
+
+
+
+
/** Handles the armor area of the player's inventory */
class cSlotAreaArmor :
public cSlotAreaInventoryBase