improvment in connect

This commit is contained in:
Eduardo Bart
2012-02-08 20:58:27 -02:00
parent 175f97b98f
commit 55fbb5f1a6
9 changed files with 26 additions and 19 deletions

View File

@@ -36,7 +36,11 @@ function UIMap:onDrop(widget, mousePos)
spinbox:setCurrentIndex(count)
local okButton = moveWindow:getChildById('buttonOk')
okButton.onClick = function() g_game.move(widget.currentDragThing, tile:getPosition(), spinbox:getCurrentIndex()) okButton:getParent():destroy() widget.currentDragThing = nil end
okButton.onClick = function()
g_game.move(widget.currentDragThing, tile:getPosition(), spinbox:getCurrentIndex())
okButton:getParent():destroy()
widget.currentDragThing = nil
end
moveWindow.onEnter = okButton.onClick
else
g_game.move(widget.currentDragThing, tile:getPosition(), 1)