Cuberite Forum
LuaWindow class - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: LuaWindow class (/thread-1146.html)

Pages: 1 2 3 4


RE: LuaWindow class - NiLSPACE - 06-01-2013

Is the OnSlotChanged callback also able to block the slot change?


RE: LuaWindow class - xoft - 06-01-2013

it's an "-ed" event, so no. Blocking a change would be quite difficult to implement; it's much easier to do it in the plugin


RE: LuaWindow class - NiLSPACE - 06-01-2013

I can't believe it ;D my pattern password is actualy working Smile


RE: LuaWindow class - xoft - 06-01-2013

Now that you know how to use them, it would be great if you could document the new classes in the wiki Wink

Note: cLuaWindow actually inherits some of its methods from the generic cWindow class


RE: LuaWindow class - NiLSPACE - 06-02-2013

I've found a bug: If you drop an item from a cLuaWindow, the OnPlayerTossingItem hook doesn't get called.


RE: LuaWindow class - bearbin - 06-02-2013

Does the hook get called if you drop it from a normal window?


RE: LuaWindow class - NiLSPACE - 06-02-2013

hmm no it doesn't. ;O


RE: LuaWindow class - xoft - 06-02-2013

That hook only gets called for when the client sends the Q keypress packet.


RE: LuaWindow class - NiLSPACE - 06-02-2013

"Drop" key Wink For me dropping stuff is "C" ;D
Is there a way to block a player throwing some stuff out of the inventory?


RE: LuaWindow class - xoft - 06-02-2013

No, not yet.
I could make an interface so that plugins can monitor window click actions, but their interpretation is really twisted and would be difficult to set callbacks for.