add customizable tap zones for tap forward/backward and config

This commit is contained in:
chrox
2013-12-15 17:02:52 +08:00
parent ea91cdb4be
commit 912a8a496b
5 changed files with 42 additions and 33 deletions

View File

@@ -138,18 +138,27 @@ function ReaderUI:init()
ui = self
}
table.insert(self.active_widgets, reader_ss)
-- frontlight controller
if Device:getFrontlight() then
-- frontlight controller
table.insert(self, ReaderFrontLight:new{
dialog = self.dialog,
view = self[1],
ui = self
})
end
-- config panel controller
if self.document.info.configurable then
local config_dialog = ReaderConfig:new{
configurable = self.document.configurable,
options = self.document.options,
dialog = self.dialog,
view = self[1],
ui = self
}
table.insert(self, config_dialog)
end
-- for page specific controller
if self.document.info.has_pages then
-- for page specific controller
-- if needed, insert a paging container
local pager = ReaderPaging:new{
dialog = self.dialog,
@@ -225,15 +234,6 @@ function ReaderUI:init()
})
end
if self.document.info.configurable then
-- configurable controller
local config_dialog = ReaderConfig:new{
configurable = self.document.configurable,
options = self.document.options,
dialog = self.dialog,
view = self[1],
ui = self
}
table.insert(self, config_dialog)
-- kopt option controller
local koptlistener = ReaderKoptListener:new{
dialog = self.dialog,