Remake cursors, closes #219 and #237

This commit is contained in:
Eduardo Bart
2013-01-25 11:17:51 -02:00
parent 0a91fff82a
commit 3a47c4f2e1
23 changed files with 217 additions and 112 deletions

View File

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

View File

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