summaryrefslogtreecommitdiffstats
path: root/source/cWindowOwner.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-20 15:25:54 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-20 15:25:54 +0200
commitbc466f07a454271d4845a7e8c7f0822541c5afbd (patch)
treec8455a2af322bbd847b6b4ea74256b78aa834c4c /source/cWindowOwner.h
parentProtoProxy: moar packets! (can now sustain parsing while connected to vanilla server, most of the times) (diff)
downloadcuberite-bc466f07a454271d4845a7e8c7f0822541c5afbd.tar
cuberite-bc466f07a454271d4845a7e8c7f0822541c5afbd.tar.gz
cuberite-bc466f07a454271d4845a7e8c7f0822541c5afbd.tar.bz2
cuberite-bc466f07a454271d4845a7e8c7f0822541c5afbd.tar.lz
cuberite-bc466f07a454271d4845a7e8c7f0822541c5afbd.tar.xz
cuberite-bc466f07a454271d4845a7e8c7f0822541c5afbd.tar.zst
cuberite-bc466f07a454271d4845a7e8c7f0822541c5afbd.zip
Diffstat (limited to 'source/cWindowOwner.h')
-rw-r--r--source/cWindowOwner.h116
1 files changed, 0 insertions, 116 deletions
diff --git a/source/cWindowOwner.h b/source/cWindowOwner.h
deleted file mode 100644
index 6c9a15a45..000000000
--- a/source/cWindowOwner.h
+++ /dev/null
@@ -1,116 +0,0 @@
-
-#pragma once
-
-#include "cBlockEntity.h"
-#include "cEntity.h"
-
-
-
-
-
-class cWindow;
-
-
-
-
-
-/**
-Base class for the behavior expected from a class that can handle UI windows for block entities.
-*/
-class cWindowOwner
-{
-public:
- cWindowOwner() :
- m_Window(NULL)
- {
- }
-
- void CloseWindow(void)
- {
- m_Window = NULL;
- }
-
- void OpenWindow(cWindow * a_Window)
- {
- m_Window = a_Window;
- }
-
- cWindow * GetWindow(void) const
- {
- return m_Window;
- }
-
- /// Returns the block position at which the element owning the window is
- virtual void GetBlockPos(int & a_BlockX, int & a_BlockY, int & a_BlockZ) = 0;
-
-private:
- cWindow * m_Window;
-} ;
-
-
-
-
-
-/**
-Window owner that is associated with a block entity (chest, furnace, ...)
-*/
-class cBlockEntityWindowOwner :
- public cWindowOwner
-{
-public:
- cBlockEntityWindowOwner(void) :
- m_BlockEntity(NULL)
- {
- }
-
- void SetBlockEntity(cBlockEntity * a_BlockEntity)
- {
- m_BlockEntity = a_BlockEntity;
- }
-
- virtual void GetBlockPos(int & a_BlockX, int & a_BlockY, int & a_BlockZ) override
- {
- a_BlockX = m_BlockEntity->GetPosX();
- a_BlockY = m_BlockEntity->GetPosY();
- a_BlockZ = m_BlockEntity->GetPosZ();
- }
-
-private:
- cBlockEntity * m_BlockEntity;
-} ;
-
-
-
-
-
-/**
-Window owner that is associated with an entity (chest minecart)
-*/
-class cEntityWindowOwner :
- public cWindowOwner
-{
-public:
- cEntityWindowOwner(void) :
- m_Entity(NULL)
- {
- }
-
- void SetEntity(cEntity * a_Entity)
- {
- m_Entity = a_Entity;
- }
-
- virtual void GetBlockPos(int & a_BlockX, int & a_BlockY, int & a_BlockZ) override
- {
- a_BlockX = (int)(m_Entity->GetPosX());
- a_BlockY = (int)(m_Entity->GetPosY());
- a_BlockZ = (int)(m_Entity->GetPosZ());
- }
-
-private:
- cEntity * m_Entity;
-} ;
-
-
-
-