fix possible mapview crash

This commit is contained in:
Eduardo Bart
2012-03-28 16:09:45 -03:00
parent 4743763d48
commit a4cef0d390
6 changed files with 87 additions and 55 deletions

View File

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