implement cursor change for win32

This commit is contained in:
Eduardo Bart
2012-01-20 00:48:38 -02:00
parent bd63bde722
commit f21927e8d9
10 changed files with 97 additions and 20 deletions

View File

@@ -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

View File

@@ -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