use two finger swipe west/east to close TOC and bookmark respectively

This commit is contained in:
chrox committed 2014-06-10 21:33:31 +08:00
1 parent b8626f6098
commit b8ce85d3de
2 files changed
+25 -1

No files matched your search

@@ -101,8 +101,18 @@ function ReaderBookmark:onShowBookmark()
item_table = self.bookmarks,
width = Screen:getWidth(),
height = Screen:getHeight(),
show_parent = menu_container,
is_borderless = true,
on_close_ges = {
GestureRange:new{
ges = "two_finger_swipe",
range = Geom:new{
x = 0, y = 0,
w = Screen:getWidth(),
h = Screen:getHeight(),
},
direction = "east"
}
}
}
local menu_container = CenterContainer:new{
@@ -130,6 +140,8 @@ function ReaderBookmark:onShowBookmark()
UIManager:close(menu_container)
end
bm_menu.show_parent = menu_container
UIManager:show(menu_container)
return true
end