mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 19:44:54 +02:00
fix possible mapview crash
This commit is contained in:
@@ -10,6 +10,7 @@ end
|
||||
|
||||
function UIResizeBorder:onHoverChange(hovered)
|
||||
if hovered then
|
||||
if g_ui.getDraggingWidget() then return end
|
||||
if self:getWidth() > self:getHeight() then
|
||||
Mouse.setVerticalCursor()
|
||||
self.vertical = true
|
||||
@@ -17,13 +18,15 @@ function UIResizeBorder:onHoverChange(hovered)
|
||||
Mouse.setHorizontalCursor()
|
||||
self.vertical = false
|
||||
end
|
||||
self.hovering = true
|
||||
if not self:isPressed() then
|
||||
Effects.fadeIn(self)
|
||||
end
|
||||
else
|
||||
if not self:isPressed() then
|
||||
if not self:isPressed() and self.hovering then
|
||||
Mouse.restoreCursor()
|
||||
Effects.fadeOut(self)
|
||||
self.hovering = false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -63,6 +66,7 @@ function UIResizeBorder:onMouseRelease(mousePos, mouseButton)
|
||||
if not self:isHovered() then
|
||||
Mouse.restoreCursor()
|
||||
Effects.fadeOut(self)
|
||||
self.hovering = false
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user