From 9684f90f8361fb314a60a387dc9ecf9bc4c3062a Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 30 May 2013 19:34:09 +0000 Subject: LuaWindow: Initial code, the window can be opened, but not much manipulated git-svn-id: http://mc-server.googlecode.com/svn/trunk@1532 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/UI/SlotArea.h | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'source/UI/SlotArea.h') diff --git a/source/UI/SlotArea.h b/source/UI/SlotArea.h index cdf14baad..0ad5296db 100644 --- a/source/UI/SlotArea.h +++ b/source/UI/SlotArea.h @@ -89,7 +89,7 @@ protected: -/// Handles the "inner" inventory of each player, excluding the armor and hotbar +/// Handles the main inventory of each player, excluding the armor and hotbar class cSlotAreaInventory : public cSlotAreaInventoryBase { @@ -106,7 +106,7 @@ public: -/// Handles the "outer" inevntory of each player - the hotbar +/// Handles the hotbar of each player class cSlotAreaHotBar : public cSlotAreaInventoryBase { @@ -123,7 +123,7 @@ public: -/// Handles the armor area of the inventory +/// Handles the armor area of the player's inventory class cSlotAreaArmor : public cSlotAreaInventoryBase { @@ -141,6 +141,26 @@ public: +/// Handles any slot area that is representing a cItemGrid; same items for all the players +class cSlotAreaItemGrid : + public cSlotArea +{ + typedef cSlotArea super; + +public: + cSlotAreaItemGrid(cItemGrid & a_ItemGrid, cWindow & a_ParentWindow); + + virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const override; + virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override; + +protected: + cItemGrid & m_ItemGrid; +} ; + + + + + /** A cSlotArea with items layout that is private to each player and is temporary, such as a crafting grid or an enchantment table. This common ancestor stores the items in a per-player map. It also implements tossing items from the map. -- cgit v1.2.3