move adjustGesCoordinate from Screen to GestureDetector

also adjust swipe direction according to screen view mode
This commit is contained in:
Qingping Hou
2013-02-19 11:13:24 +08:00
parent ab956a10c5
commit a655219eba
3 changed files with 27 additions and 17 deletions

View File

@@ -148,21 +148,6 @@ function Screen:setScreenMode(mode)
end
end
--[[
@brief change gesture's x and y coordinates according to screen view mode
@param ges gesture that you want to adjust
@return adjusted gesture.
--]]
function Screen:adjustGesCoordinate(ges)
if self.cur_rotation_mode == 1 then
--@TODO fix wipe direction 03.02 2013 (houqp)
ges.pos.x, ges.pos.y = (self.width - ges.pos.y), (ges.pos.x)
end
return ges
end
function Screen:saveCurrentBB()
local width, height = self:getWidth(), self:getHeight()