1
0
Fork 0
cuberite-2a/src/UI/ChestWindow.h

47 lines
800 B
C
Raw Normal View History

2014-12-13 14:06:55 +00:00
// ChestWindow.h
// Representing the UI window for the chest block
#pragma once
#include "Window.h"
2020-04-13 16:38:06 +00:00
class cChestWindow:
2014-12-13 14:06:55 +00:00
public cWindow
{
2020-04-13 16:38:06 +00:00
using Super = cWindow;
2014-12-13 14:06:55 +00:00
public:
2020-04-13 16:38:06 +00:00
2015-03-10 18:40:53 +00:00
cChestWindow(cChestEntity * a_Chest);
cChestWindow(cChestEntity * a_PrimaryChest, cChestEntity * a_SecondaryChest);
virtual ~cChestWindow() override;
2015-03-10 18:40:53 +00:00
virtual bool ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse) override;
virtual void OpenedByPlayer(cPlayer & a_Player) override;
virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override;
2016-02-05 21:45:45 +00:00
2014-12-13 14:06:55 +00:00
protected:
cWorld * m_World;
Vector3i m_BlockPos; // Position of the chest, for the window-close packet
2014-12-13 14:06:55 +00:00
cChestEntity * m_PrimaryChest;
cChestEntity * m_SecondaryChest;
};