mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
Refactor for documentation
This commit is contained in:
@@ -16,13 +16,13 @@ function UIGameMap:onDragEnter(mousePos)
|
||||
if not thing then return false end
|
||||
|
||||
self.currentDragThing = thing
|
||||
Mouse.setTargetCursor()
|
||||
g_mouse.setTargetCursor()
|
||||
return true
|
||||
end
|
||||
|
||||
function UIGameMap:onDragLeave(droppedWidget, mousePos)
|
||||
self.currentDragThing = nil
|
||||
Mouse.restoreCursor()
|
||||
g_mouse.restoreCursor()
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -57,8 +57,8 @@ function UIGameMap:onMouseRelease(mousePosition, mouseButton)
|
||||
if tile == nil then return false end
|
||||
|
||||
if Options.getOption('classicControl') and
|
||||
((Mouse.isPressed(MouseLeftButton) and mouseButton == MouseRightButton) or
|
||||
(Mouse.isPressed(MouseRightButton) and mouseButton == MouseLeftButton)) then
|
||||
((g_mouse.isPressed(MouseLeftButton) and mouseButton == MouseRightButton) or
|
||||
(g_mouse.isPressed(MouseRightButton) and mouseButton == MouseLeftButton)) then
|
||||
local tile = self:getTile(mousePosition)
|
||||
g_game.look(tile:getTopLookThing())
|
||||
self.cancelNextRelease = true
|
||||
|
@@ -6,14 +6,14 @@ function UIItem:onDragEnter(mousePos)
|
||||
|
||||
self:setBorderWidth(1)
|
||||
self.currentDragThing = item
|
||||
Mouse.setTargetCursor()
|
||||
g_mouse.setTargetCursor()
|
||||
return true
|
||||
end
|
||||
|
||||
function UIItem:onDragLeave(droppedWidget, mousePos)
|
||||
if self:isVirtual() then return false end
|
||||
self.currentDragThing = nil
|
||||
Mouse.restoreCursor()
|
||||
g_mouse.restoreCursor()
|
||||
self:setBorderWidth(0)
|
||||
return true
|
||||
end
|
||||
@@ -68,8 +68,8 @@ function UIItem:onMouseRelease(mousePosition, mouseButton)
|
||||
if not item or not self:containsPoint(mousePosition) then return false end
|
||||
|
||||
if Options.getOption('classicControl') and
|
||||
((Mouse.isPressed(MouseLeftButton) and mouseButton == MouseRightButton) or
|
||||
(Mouse.isPressed(MouseRightButton) and mouseButton == MouseLeftButton)) then
|
||||
((g_mouse.isPressed(MouseLeftButton) and mouseButton == MouseRightButton) or
|
||||
(g_mouse.isPressed(MouseRightButton) and mouseButton == MouseLeftButton)) then
|
||||
g_game.look(item)
|
||||
self.cancelNextRelease = true
|
||||
return true
|
||||
|
Reference in New Issue
Block a user