summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Debuggers
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-31 09:16:14 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-31 09:16:14 +0200
commitbf7c2fe783133cd9f15d96981053ef7ab6aaf49a (patch)
tree3c30a01cd8690a59af2db1ee440bf7e8d2bc61f4 /MCServer/Plugins/Debuggers
parentAdded the OnClosing callback to cLuaWindow API (diff)
downloadcuberite-bf7c2fe783133cd9f15d96981053ef7ab6aaf49a.tar
cuberite-bf7c2fe783133cd9f15d96981053ef7ab6aaf49a.tar.gz
cuberite-bf7c2fe783133cd9f15d96981053ef7ab6aaf49a.tar.bz2
cuberite-bf7c2fe783133cd9f15d96981053ef7ab6aaf49a.tar.lz
cuberite-bf7c2fe783133cd9f15d96981053ef7ab6aaf49a.tar.xz
cuberite-bf7c2fe783133cd9f15d96981053ef7ab6aaf49a.tar.zst
cuberite-bf7c2fe783133cd9f15d96981053ef7ab6aaf49a.zip
Diffstat (limited to 'MCServer/Plugins/Debuggers')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 484ea88be..f35e2d2de 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -588,9 +588,15 @@ function HandleTestWndCmd(a_Split, a_Player)
return (attempt <= 3); -- refuse twice, then allow
end
+ -- Log the slot changes
+ local OnSlotChanged = function(Window, SlotNum)
+ LOG("Window \"" .. Window:GetWindowTitle() .. "\" slot " .. SlotNum .. " changed.");
+ end
+
local Window = cLuaWindow(WindowType, WindowSizeX, WindowSizeY, "TestWnd");
Window:SetSlot(a_Player, 0, cItem(E_ITEM_DIAMOND, 64));
Window:SetOnClosing(OnClosing);
+ Window:SetOnSlotChanged(OnSlotChanged);
a_Player:OpenWindow(Window);