mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 23:26:51 +01:00
drag fixes
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user