mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 12:04:55 +02:00
Use push/pop mechanism for cursors
This commit is contained in:
@@ -17,7 +17,7 @@ function UIGameMap:onDragEnter(mousePos)
|
||||
|
||||
self.currentDragThing = thing
|
||||
|
||||
g_mouse.setCursor('target')
|
||||
g_mouse.pushCursor('target')
|
||||
self.allowNextRelease = false
|
||||
return true
|
||||
end
|
||||
@@ -25,7 +25,7 @@ end
|
||||
function UIGameMap:onDragLeave(droppedWidget, mousePos)
|
||||
self.currentDragThing = nil
|
||||
self.hoveredWho = nil
|
||||
g_mouse.restoreCursor()
|
||||
g_mouse.popCursor('target')
|
||||
return true
|
||||
end
|
||||
|
||||
|
@@ -6,14 +6,14 @@ function UIItem:onDragEnter(mousePos)
|
||||
|
||||
self:setBorderWidth(1)
|
||||
self.currentDragThing = item
|
||||
g_mouse.setCursor('target')
|
||||
g_mouse.pushCursor('target')
|
||||
return true
|
||||
end
|
||||
|
||||
function UIItem:onDragLeave(droppedWidget, mousePos)
|
||||
if self:isVirtual() then return false end
|
||||
self.currentDragThing = nil
|
||||
g_mouse.restoreCursor()
|
||||
g_mouse.popCursor('target')
|
||||
self:setBorderWidth(0)
|
||||
self.hoveredWho = nil
|
||||
return true
|
||||
|
Reference in New Issue
Block a user