From bc466f07a454271d4845a7e8c7f0822541c5afbd Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 20 Sep 2012 13:25:54 +0000 Subject: Refactored windows. As described on the forum: http://forum.mc-server.org/showthread.php?tid=561 For now, only basic clicking works; shift-click not implemented yet. git-svn-id: http://mc-server.googlecode.com/svn/trunk@867 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/blocks/BlockWorkbench.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'source/blocks/BlockWorkbench.h') diff --git a/source/blocks/BlockWorkbench.h b/source/blocks/BlockWorkbench.h index 6c5f0d3e8..998e07d9b 100644 --- a/source/blocks/BlockWorkbench.h +++ b/source/blocks/BlockWorkbench.h @@ -1,9 +1,14 @@ #pragma once #include "Block.h" -#include "../cCraftingWindow.h" +#include "../UI/cWindow.h" #include "../cPlayer.h" -class cBlockWorkbenchHandler : public cBlockHandler + + + + +class cBlockWorkbenchHandler: + public cBlockHandler { public: cBlockWorkbenchHandler(BLOCKTYPE a_BlockID) @@ -11,9 +16,9 @@ public: { } - virtual void OnUse(cWorld *a_World, cPlayer *a_Player, int a_X, int a_Y, int a_Z) override + virtual void OnUse(cWorld * a_World, cPlayer *a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) override { - cWindow* Window = new cCraftingWindow(0, true); + cWindow * Window = new cCraftingWindow(a_BlockX, a_BlockY, a_BlockZ); a_Player->OpenWindow(Window); } @@ -28,4 +33,4 @@ public: } -}; +}; \ No newline at end of file -- cgit v1.2.3