mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 23:26:51 +01:00
implement cursor change for win32
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
function setTargetCursor()
|
||||
g_window.setMouseCursor('/core_styles/icons/targetcursor.png')
|
||||
g_window.setMouseCursor('/core_styles/icons/targetcursor.png', {x=9,y=9})
|
||||
end
|
||||
|
||||
function restoreCursor()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 266 B |
@@ -1,7 +1,7 @@
|
||||
function UIItem:onDragEnter(mousePos)
|
||||
local item = self:getItem()
|
||||
if not item then return false end
|
||||
|
||||
|
||||
self.currentDragThing = item
|
||||
setTargetCursor()
|
||||
return true
|
||||
@@ -15,10 +15,10 @@ end
|
||||
|
||||
function UIItem:onDrop(widget, mousePos)
|
||||
if not widget or not widget.currentDragThing then return false end
|
||||
|
||||
|
||||
local pos = self.position
|
||||
local count = 1 -- todo make a window for it
|
||||
|
||||
|
||||
Game.move(widget.currentDragThing, pos, count)
|
||||
return true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user