monodark
New Member
Hi folks,
My problem is that the drop event parameters on an Item widget are null.
I'm trying to understand how creating OTClient UI's works, which is actually going quiet well.
So I decided to add a minecraft style crafting table to the game, as shown below.
In my .otui file I have a event handler attached to the Item widget:
The function in the LUA file is as follows:
Both messages are send..
So I checked the code in the source of OTClient (uimanager.cpp - updateDraggingWidget - line 191):
Here the parameters are send, but never recieved in the lua code.
Can anyone help me with this?
Thanks in advance!
My problem is that the drop event parameters on an Item widget are null.
I'm trying to understand how creating OTClient UI's works, which is actually going quiet well.
So I decided to add a minecraft style crafting table to the game, as shown below.
In my .otui file I have a event handler attached to the Item widget:
Code:
Item
id: slot1
anchors.left: parent.left
anchors.top: parent.top
margin-top: 10
&position: {x=65500, y=1, z=0}
@onDrop: modules.game_tibiacraft.itemDropped()
The function in the LUA file is as follows:
Code:
function itemDropped(droppedItem, mousePosition)
if droppedItem == nil then
modules.game_textmessage.displayPrivateMessage('no item dropped')
end
if mousePosition == nil then
modules.game_textmessage.displayPrivateMessage('no mouse position')
end
end
Both messages are send..
So I checked the code in the source of OTClient (uimanager.cpp - updateDraggingWidget - line 191):
Code:
if(child->onDrop(oldDraggingWidget, clickedPos)) {
...
}
Here the parameters are send, but never recieved in the lua code.
Can anyone help me with this?
Thanks in advance!