Refactor for documentation

This commit is contained in:
Eduardo Bart
2012-06-25 19:13:30 -03:00
parent 2c7ae6e521
commit 98a1b611bf
106 changed files with 654 additions and 780 deletions

View File

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

View File

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