mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 12:04:55 +02:00
Configure default hotkey, fix map release
This commit is contained in:
@@ -17,7 +17,7 @@ function UIGameMap:onDragEnter(mousePos)
|
||||
|
||||
self.currentDragThing = thing
|
||||
g_mouse.setTargetCursor()
|
||||
self.cancelNextRelease = true
|
||||
self.allowNextRelease = false
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -50,12 +50,11 @@ function UIGameMap:onDrop(widget, mousePos)
|
||||
end
|
||||
|
||||
function UIGameMap:onMousePress()
|
||||
self.cancelNextRelease = false
|
||||
self.allowNextRelease = true
|
||||
end
|
||||
|
||||
function UIGameMap:onMouseRelease(mousePosition, mouseButton)
|
||||
if self.cancelNextRelease then
|
||||
self.cancelNextRelease = false
|
||||
if not self.allowNextRelease then
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -86,7 +85,7 @@ function UIGameMap:onMouseRelease(mousePosition, mouseButton)
|
||||
|
||||
local ret = modules.game_interface.processMouseAction(mousePosition, mouseButton, autoWalkPos, lookThing, useThing, creatureThing)
|
||||
if ret then
|
||||
self.cancelNextRelease = true
|
||||
self.allowNextRelease = false
|
||||
end
|
||||
|
||||
return ret
|
||||
|
Reference in New Issue
Block a user