mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Option to choose gesture to open menu
This commit is contained in:
committed by
Frans de Jonge
parent
a8513c95b6
commit
64529b5391
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user