From bf7c2fe783133cd9f15d96981053ef7ab6aaf49a Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 31 May 2013 07:16:14 +0000 Subject: Added cLuaWindow:SetOnSlotChanged(); the callback is called only for non-inventory slots git-svn-id: http://mc-server.googlecode.com/svn/trunk@1535 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/LuaWindow.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/LuaWindow.h') diff --git a/source/LuaWindow.h b/source/LuaWindow.h index 30c07bdbf..dc4497df7 100644 --- a/source/LuaWindow.h +++ b/source/LuaWindow.h @@ -10,6 +10,7 @@ #pragma once #include "UI/Window.h" +#include "ItemGrid.h" @@ -35,7 +36,8 @@ cPlayer:OpenWindow check if the window is of this class, and if so, make a globa This reference needs to be unreferenced in the Destroy() function. */ class cLuaWindow : - public cWindow + public cWindow, + public cItemGrid::cListener { typedef cWindow super; @@ -83,6 +85,9 @@ protected: // cWindow overrides: virtual bool ClosedByPlayer(cPlayer & a_Player) override; virtual void Destroy(void) override; + + // cItemGrid::cListener overrides: + virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) override; } ; // tolua_export -- cgit v1.2.3