drag fixes

This commit is contained in:
Eduardo Bart
2012-02-09 16:38:50 -02:00
parent 1145eb7e42
commit 96358b317d
7 changed files with 82 additions and 123 deletions

View File

@@ -2,7 +2,7 @@ function UIItem:onDragEnter(mousePos)
if self:isVirtual() then return false end
local item = self:getItem()
if not item then return true end
if not item then return false end
self:setBorderWidth(1)

View File

@@ -24,6 +24,7 @@ function UIMiniWindow:onDragEnter(mousePos)
local oldPos = self:getPosition()
self.movingReference = { x = mousePos.x - oldPos.x, y = mousePos.y - oldPos.y }
self:setPosition(oldPos)
return true
end
function UIMiniWindow:onDragLeave(droppedWidget, mousePos)

View File

@@ -25,6 +25,7 @@ end
function UIWindow:onDragEnter(mousePos)
self:breakAnchors()
self.movingReference = { x = mousePos.x - self:getX(), y = mousePos.y - self:getY() }
return true
end
function UIWindow:onDragLeave(droppedWidget, mousePos)