mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
@@ -19,6 +19,8 @@ function init()
|
||||
g_particles.importParticle('/particles/' .. particle)
|
||||
end
|
||||
end
|
||||
|
||||
g_mouse.loadCursors('/cursors/cursors')
|
||||
end
|
||||
|
||||
function terminate()
|
||||
|
@@ -27,10 +27,10 @@ function UIResizeBorder:onHoverChange(hovered)
|
||||
if hovered then
|
||||
if g_mouse.isCursorChanged() or g_mouse.isPressed() then return end
|
||||
if self:getWidth() > self:getHeight() then
|
||||
g_mouse.setVerticalCursor()
|
||||
g_mouse.setCursor('vertical')
|
||||
self.vertical = true
|
||||
else
|
||||
g_mouse.setHorizontalCursor()
|
||||
g_mouse.setCursor('horizontal')
|
||||
self.vertical = false
|
||||
end
|
||||
self.hovering = true
|
||||
|
@@ -14,10 +14,10 @@ function UISplitter:onHoverChange(hovered)
|
||||
if hovered and (self:canUpdateMargin(margin + 1) ~= margin or self:canUpdateMargin(margin - 1) ~= margin) then
|
||||
if g_mouse.isCursorChanged() or g_mouse.isPressed() then return end
|
||||
if self:getWidth() > self:getHeight() then
|
||||
g_mouse.setVerticalCursor()
|
||||
g_mouse.setCursor('vertical')
|
||||
self.vertical = true
|
||||
else
|
||||
g_mouse.setHorizontalCursor()
|
||||
g_mouse.setCursor('horizontal')
|
||||
self.vertical = false
|
||||
end
|
||||
self.hovering = true
|
||||
|
@@ -235,7 +235,7 @@ function startChooseItem()
|
||||
connect(mouseGrabberWidget, { onMouseRelease = onChooseItemMouseRelease })
|
||||
|
||||
mouseGrabberWidget:grabMouse()
|
||||
g_mouse.setTargetCursor()
|
||||
g_mouse.setCursor('target-cursor')
|
||||
|
||||
hide()
|
||||
end
|
||||
|
@@ -331,14 +331,14 @@ function startUseWith(thing)
|
||||
selectedType = 'use'
|
||||
selectedThing = thing
|
||||
mouseGrabberWidget:grabMouse()
|
||||
g_mouse.setTargetCursor()
|
||||
g_mouse.setCursor('target')
|
||||
end
|
||||
|
||||
function startTradeWith(thing)
|
||||
selectedType = 'trade'
|
||||
selectedThing = thing
|
||||
mouseGrabberWidget:grabMouse()
|
||||
g_mouse.setTargetCursor()
|
||||
g_mouse.setCursor('target')
|
||||
end
|
||||
|
||||
function createThingMenu(menuPosition, lookThing, useThing, creatureThing)
|
||||
|
@@ -16,7 +16,8 @@ function UIGameMap:onDragEnter(mousePos)
|
||||
if not thing then return false end
|
||||
|
||||
self.currentDragThing = thing
|
||||
g_mouse.setTargetCursor()
|
||||
|
||||
g_mouse.setCursor('target')
|
||||
self.allowNextRelease = false
|
||||
return true
|
||||
end
|
||||
|
@@ -6,7 +6,7 @@ function UIItem:onDragEnter(mousePos)
|
||||
|
||||
self:setBorderWidth(1)
|
||||
self.currentDragThing = item
|
||||
g_mouse.setTargetCursor()
|
||||
g_mouse.setCursor('target')
|
||||
return true
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user