fix move on different floors, dragqueen border on uiitem

This commit is contained in:
Henrique Santiago
2012-01-20 23:01:11 -02:00
parent 820f94a1d9
commit e3096c1648
6 changed files with 10 additions and 15 deletions

View File

@@ -19,10 +19,11 @@ end
function UIMap:onDrop(widget, mousePos)
if not widget or not widget.currentDragThing then return false end
local pos = self:getPosition(mousePos)
local tile = self:getTile(mousePos)
if not tile then return false end
local count = 1 -- todo make a window for it
Game.move(widget.currentDragThing, pos, count)
Game.move(widget.currentDragThing, tile:getPos(), count)
return true
end