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

This commit is contained in:
chrox
2014-06-10 21:13:21 +08:00
parent b8626f6098
commit b8ce85d3de
2 changed files with 25 additions and 1 deletions

View File

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