diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-06 22:10:16 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-06 22:10:16 +0200 |
commit | e8366993ce3f1cc0c2c6cde1d133773d1f23c474 (patch) | |
tree | 789fd452065ff6aa68f2ceac5664959bdb24afc0 /source/cWindowOwner.h | |
parent | Added the Doxygen configuration file (diff) | |
download | cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.gz cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.bz2 cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.lz cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.xz cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.zst cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cWindowOwner.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/source/cWindowOwner.h b/source/cWindowOwner.h index 3a1797f74..ef08bbe44 100644 --- a/source/cWindowOwner.h +++ b/source/cWindowOwner.h @@ -1,13 +1,21 @@ + #pragma once +#include "cBlockEntity.h" + + + + class cWindow; -class cBlockEntity; +/** +Implements the base behavior expected from a class that can handle UI windows for block entities. +*/ class cWindowOwner { public: @@ -17,11 +25,17 @@ public: cWindow* GetWindow() { return m_Window; } - void SetEntity(cBlockEntity *a_Entity) { m_Entity = a_Entity; } - cBlockEntity *GetEntity() { return m_Entity; } + void SetEntity(cBlockEntity * a_Entity) { m_Entity = a_Entity; } + void GetBlockPos(int & a_BlockX, int & a_BlockY, int & a_BlockZ) + { + a_BlockX = m_Entity->GetPosX(); + a_BlockY = m_Entity->GetPosY(); + a_BlockZ = m_Entity->GetPosZ(); + } + private: - cWindow* m_Window; - cBlockEntity *m_Entity; + cWindow * m_Window; + cBlockEntity * m_Entity; }; |