diff options
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; }; |