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

47 lines
800 B
C
Raw Normal View History

2014-12-13 09:06:55 -05:00
// ChestWindow.h
// Representing the UI window for the chest block
#pragma once
#include "Window.h"
2020-04-13 12:38:06 -04:00
class cChestWindow:
2014-12-13 09:06:55 -05:00
public cWindow
{
2020-04-13 12:38:06 -04:00
using Super = cWindow;
2014-12-13 09:06:55 -05:00
public:
2020-04-13 12:38:06 -04:00
2015-03-10 14:40:53 -04:00
cChestWindow(cChestEntity * a_Chest);
cChestWindow(cChestEntity * a_PrimaryChest, cChestEntity * a_SecondaryChest);
virtual ~cChestWindow() override;
2015-03-10 14:40:53 -04: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 16:45:45 -05:00
2014-12-13 09:06:55 -05:00
protected:
cWorld * m_World;
Vector3i m_BlockPos; // Position of the chest, for the window-close packet
2014-12-13 09:06:55 -05:00
cChestEntity * m_PrimaryChest;
cChestEntity * m_SecondaryChest;
};