mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Page turn animations
Kindle PW5 (MTK) with hardware support Currently only in Crengine
This commit is contained in:
@@ -1006,6 +1006,9 @@ function ReaderRolling:_gotoPos(new_pos, do_dim_area)
|
||||
else
|
||||
self.view.dim_area:clear()
|
||||
end
|
||||
if self.current_pos and not UIManager.currently_scrolling then
|
||||
self.ui:handleEvent(Event:new("PageChangeAnimation", new_pos > self.current_pos))
|
||||
end
|
||||
self.ui.document:gotoPos(new_pos)
|
||||
-- The current page we get in scroll mode may be a bit innacurate,
|
||||
-- but we give it anyway to onPosUpdate so footer and statistics can
|
||||
@@ -1038,6 +1041,9 @@ function ReaderRolling:_gotoPage(new_page, free_first_page, internal)
|
||||
end
|
||||
end
|
||||
end
|
||||
if self.current_page then
|
||||
self.ui:handleEvent(Event:new("PageChangeAnimation", new_page > self.current_page))
|
||||
end
|
||||
self.ui.document:gotoPage(new_page, internal)
|
||||
if self.view.view_mode == "page" then
|
||||
self.ui:handleEvent(Event:new("PageUpdate", self.ui.document:getCurrentPage()))
|
||||
|
||||
Reference in New Issue
Block a user