Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Attributes | List of all members
cSlotAreaDoubleChest Class Reference

#include <SlotArea.h>

Inheritance diagram for cSlotAreaDoubleChest:
Inheritance graph
[legend]
Collaboration diagram for cSlotAreaDoubleChest:
Collaboration graph
[legend]

Public Member Functions

 cSlotAreaDoubleChest (cChestEntity *a_TopChest, cChestEntity *a_BottomChest, cWindow &a_ParentWindow)
 
virtual const cItemGetSlot (int a_SlotNum, cPlayer &a_Player) const override
 Called to retrieve an item in the specified slot for the specified player. More...
 
virtual void SetSlot (int a_SlotNum, cPlayer &a_Player, const cItem &a_Item) override
 Called to set an item in the specified slot for the specified player. More...
 
- Public Member Functions inherited from cSlotArea
virtual void Clicked (cPlayer &a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem &a_ClickedItem)
 Called when a player clicks in the window. More...
 
virtual bool CollectItemsToHand (cItem &a_Dragging, cPlayer &a_Player, bool a_CollectFullStacks)
 Called on DblClicking to collect all stackable items into hand. More...
 
 cSlotArea (int a_NumSlots, cWindow &a_ParentWindow)
 
virtual void DblClicked (cPlayer &a_Player, int a_SlotNum)
 Called from Clicked when the action is a caDblClick. More...
 
virtual void DistributeStack (cItem &a_ItemStack, cPlayer &a_Player, bool a_ShouldApply, bool a_KeepEmptySlots, bool a_BackFill)
 Called to store as much of a_ItemStack in the area as possible. More...
 
virtual void DropClicked (cPlayer &a_Player, int a_SlotNum, bool a_DropStack)
 Called from Clicked when the action is a drop click. More...
 
int GetNumSlots (void) const
 
virtual void MiddleClicked (cPlayer &a_Player, int a_SlotNum)
 Called from Clicked when the action is a middleclick. More...
 
virtual void NumberClicked (cPlayer &a_Player, int a_SlotNum, eClickAction a_ClickAction)
 Called from Clicked when the action is a number click. More...
 
virtual void OnPlayerAdded (cPlayer &a_Player)
 Called when a new player opens the same parent window. More...
 
virtual void OnPlayerRemoved (cPlayer &a_Player)
 Called when one of the players closes the parent window. More...
 
virtual void ShiftClicked (cPlayer &a_Player, int a_SlotNum, const cItem &a_ClickedItem)
 Called from Clicked when the action is a shiftclick (left or right) More...
 
virtual ~cSlotArea ()
 

Protected Attributes

cChestEntitym_BottomChest
 
cChestEntitym_TopChest
 
- Protected Attributes inherited from cSlotArea
int m_NumSlots
 
cWindowm_ParentWindow
 

Detailed Description

Definition at line 437 of file SlotArea.h.

Constructor & Destructor Documentation

◆ cSlotAreaDoubleChest()

cSlotAreaDoubleChest::cSlotAreaDoubleChest ( cChestEntity a_TopChest,
cChestEntity a_BottomChest,
cWindow a_ParentWindow 
)

Definition at line 460 of file SlotArea.cpp.

Member Function Documentation

◆ GetSlot()

const cItem * cSlotAreaDoubleChest::GetSlot ( int  a_SlotNum,
cPlayer a_Player 
) const
overridevirtual

Called to retrieve an item in the specified slot for the specified player.

Must return a valid cItem.

Implements cSlotArea.

Definition at line 471 of file SlotArea.cpp.

◆ SetSlot()

void cSlotAreaDoubleChest::SetSlot ( int  a_SlotNum,
cPlayer a_Player,
const cItem a_Item 
)
overridevirtual

Called to set an item in the specified slot for the specified player.

Implements cSlotArea.

Definition at line 488 of file SlotArea.cpp.

Member Data Documentation

◆ m_BottomChest

cChestEntity* cSlotAreaDoubleChest::m_BottomChest
protected

Definition at line 448 of file SlotArea.h.

◆ m_TopChest

cChestEntity* cSlotAreaDoubleChest::m_TopChest
protected

Definition at line 447 of file SlotArea.h.


The documentation for this class was generated from the following files: