Option to choose gesture to open menu

This commit is contained in:
robert00s
2017-08-08 18:20:46 +02:00
committed by Frans de Jonge
parent a8513c95b6
commit 64529b5391
5 changed files with 90 additions and 10 deletions

View File

@@ -20,6 +20,10 @@ function ReaderConfig:init()
if Device:isTouchDevice() then
self:initGesListener()
end
self.activation_menu = G_reader_settings:readSetting("activate_menu")
if self.activation_menu == nil then
self.activation_menu = "swipe_tap"
end
end
function ReaderConfig:initGesListener()
@@ -65,12 +69,14 @@ function ReaderConfig:onShowConfigMenu()
end
function ReaderConfig:onTapShowConfigMenu()
self:onShowConfigMenu()
return true
if self.activation_menu ~= "swipe" then
self:onShowConfigMenu()
return true
end
end
function ReaderConfig:onSwipeShowConfigMenu(ges)
if ges.direction == "north" then
if self.activation_menu ~= "tap" and ges.direction == "north" then
self:onShowConfigMenu()
return true
end