diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-05-24 09:30:39 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-05-24 09:30:39 +0200 |
commit | cf87169737fdeeee7d4b160688bbed7194e46147 (patch) | |
tree | 7daaeb9af8e3187cde6068c3cff5ff0ee64f0067 /source/UI | |
parent | Added ItemCategory::IsArmor() (diff) | |
download | cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.tar cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.tar.gz cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.tar.bz2 cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.tar.lz cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.tar.xz cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.tar.zst cuberite-cf87169737fdeeee7d4b160688bbed7194e46147.zip |
Diffstat (limited to '')
-rw-r--r-- | source/UI/SlotArea.cpp | 2 | ||||
-rw-r--r-- | source/UI/SlotArea.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/UI/SlotArea.cpp b/source/UI/SlotArea.cpp index 7c7b8cd4a..07b191292 100644 --- a/source/UI/SlotArea.cpp +++ b/source/UI/SlotArea.cpp @@ -613,7 +613,7 @@ void cSlotAreaInventoryBase::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAc const cItem * cSlotAreaInventoryBase::GetSlot(int a_SlotNum, cPlayer & a_Player)
{
- // a_SlotNum ranges from 0 to 35, map that to the player's inventory slots 9 to 44
+ // a_SlotNum ranges from 0 to 35, map that to the player's inventory slots according to the internal offset
return &a_Player.GetInventory().GetSlot(a_SlotNum + m_SlotOffset);
}
diff --git a/source/UI/SlotArea.h b/source/UI/SlotArea.h index 2738e08e9..2b56f3228 100644 --- a/source/UI/SlotArea.h +++ b/source/UI/SlotArea.h @@ -8,7 +8,7 @@ #pragma once
-#include "../Item.h"
+#include "../Inventory.h"
@@ -97,7 +97,7 @@ class cSlotAreaInventory : public:
cSlotAreaInventory(cWindow & a_ParentWindow) :
- cSlotAreaInventoryBase(27, 9, a_ParentWindow) // 27 slots, starting at inventory index 9
+ cSlotAreaInventoryBase(cInventory::invInventoryCount, cInventory::invInventoryOffset, a_ParentWindow)
{
}
} ;
@@ -114,7 +114,7 @@ class cSlotAreaHotBar : public:
cSlotAreaHotBar(cWindow & a_ParentWindow) :
- cSlotAreaInventoryBase(9, 36, a_ParentWindow)
+ cSlotAreaInventoryBase(cInventory::invHotbarCount, cInventory::invHotbarOffset, a_ParentWindow)
{
}
} ;
@@ -129,7 +129,7 @@ class cSlotAreaArmor : {
public:
cSlotAreaArmor(cWindow & a_ParentWindow) :
- cSlotAreaInventoryBase(4, 5, a_ParentWindow)
+ cSlotAreaInventoryBase(cInventory::invArmorCount, cInventory::invArmorOffset, a_ParentWindow)
{
}
|