add swipe rolling for crereader

pull/65/head
chrox 11 years ago
parent 4fbebe0d4c
commit 1c9388cd17

@ -88,7 +88,17 @@ function ReaderRolling:initGesListener()
h = 5*Screen:getHeight()/8,
}
}
}
},
Swipe = {
GestureRange:new{
ges = "swipe",
range = Geom:new{
x = 0, y = 0,
w = Screen:getWidth(),
h = Screen:getHeight(),
}
}
},
}
end
@ -149,6 +159,15 @@ function ReaderRolling:onTapBackward()
return true
end
function ReaderRolling:onSwipe(arg, ges)
if ges.direction == "west" or ges.direction == "north" then
self:onGotoViewRel(1)
elseif ges.direction == "east" or ges.direction == "south" then
self:onGotoViewRel(-1)
end
return true
end
function ReaderRolling:onPosUpdate(new_pos)
self.current_pos = new_pos
end

Loading…
Cancel
Save