diff options
author | Mattes D <github@xoft.cz> | 2014-04-20 13:34:38 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-04-20 13:34:38 +0200 |
commit | f99bdfb457bc1e497dd74932611a91add72b4f27 (patch) | |
tree | c5f0b53b4208b96089788719dfe2a1115ca5804d /src/UI/Window.h | |
parent | APIDump: Added a ChunkStay article. (diff) | |
parent | Fixed Code (diff) | |
download | cuberite-f99bdfb457bc1e497dd74932611a91add72b4f27.tar cuberite-f99bdfb457bc1e497dd74932611a91add72b4f27.tar.gz cuberite-f99bdfb457bc1e497dd74932611a91add72b4f27.tar.bz2 cuberite-f99bdfb457bc1e497dd74932611a91add72b4f27.tar.lz cuberite-f99bdfb457bc1e497dd74932611a91add72b4f27.tar.xz cuberite-f99bdfb457bc1e497dd74932611a91add72b4f27.tar.zst cuberite-f99bdfb457bc1e497dd74932611a91add72b4f27.zip |
Diffstat (limited to 'src/UI/Window.h')
-rw-r--r-- | src/UI/Window.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/src/UI/Window.h b/src/UI/Window.h index 030182888..1ca67bfd8 100644 --- a/src/UI/Window.h +++ b/src/UI/Window.h @@ -136,11 +136,11 @@ public: void SetWindowTitle(const AString & a_WindowTitle ) { m_WindowTitle = a_WindowTitle; } /// Sends the UpdateWindowProperty (0x69) packet to all clients of the window - void SetProperty(int a_Property, int a_Value); + virtual void SetProperty(int a_Property, int a_Value); /// Sends the UpdateWindowPropert(0x69) packet to the specified player - void SetProperty(int a_Property, int a_Value, cPlayer & a_Player); - + virtual void SetProperty(int a_Property, int a_Value, cPlayer & a_Player); + // tolua_end void OwnerDestroyed(void); @@ -165,7 +165,7 @@ public: /// Used by cSlotAreas to send individual slots to clients, a_RelativeSlotNum is the slot number relative to a_SlotArea void SendSlot(cPlayer & a_Player, cSlotArea * a_SlotArea, int a_RelativeSlotNum); - + protected: cSlotAreas m_SlotAreas; @@ -231,6 +231,32 @@ public: +class cEnchantingWindow : + public cWindow +{ + typedef cWindow super; +public: + cEnchantingWindow(int a_BlockX, int a_BlockY, int a_BlockZ); + virtual void SetProperty(int a_Property, int a_Value, cPlayer & a_Player) override; + virtual void SetProperty(int a_Property, int a_Value) override; + + /** Return the Value of a Property */ + int GetPropertyValue(int a_Property); + + /** Set the Position Values to the Position of the Enchantment Table */ + void GetBlockPos(int & a_PosX, int & a_PosY, int & a_PosZ); + + cSlotArea * m_SlotArea; + +protected: + int m_PropertyValue[3]; + int m_BlockX, m_BlockY, m_BlockZ; +}; + + + + + class cFurnaceWindow : public cWindow { |