add: vertical pan in crereader
This commit is contained in:
1 parent
5e58a94632
commit
3992fdca0f
1 file changed
+17
-5
+17
-5
@@ -43,11 +43,6 @@ function CREReader:loadSpecialSettings()
|
||||
cre.setGammaIndex(self.gamma_index)
|
||||
end
|
||||
|
||||
function CREReader:saveSpecialSettings()
|
||||
self.settings:savesetting("font_face", self.font_face)
|
||||
self.settings:savesetting("gamma_index", self.gamma_index)
|
||||
end
|
||||
|
||||
function CREReader:getLastPageOrPos()
|
||||
local last_percent = self.settings:readSetting("last_percent")
|
||||
if last_percent then
|
||||
@@ -57,6 +52,11 @@ function CREReader:getLastPageOrPos()
|
||||
end
|
||||
end
|
||||
|
||||
function CREReader:saveSpecialSettings()
|
||||
self.settings:savesetting("font_face", self.font_face)
|
||||
self.settings:savesetting("gamma_index", self.gamma_index)
|
||||
end
|
||||
|
||||
function CREReader:saveLastPageOrPos()
|
||||
self.settings:savesetting("last_percent", self.percent)
|
||||
end
|
||||
@@ -220,4 +220,16 @@ function CREReader:adjustCreReaderCommands()
|
||||
cr:redrawCurrentPage()
|
||||
end
|
||||
)
|
||||
self.commands:add(KEY_FW_UP, nil, "joypad up",
|
||||
"pan "..self.shift_y.." pixels upwards",
|
||||
function(cr)
|
||||
cr:goto(cr.pos - cr.shift_y)
|
||||
end
|
||||
)
|
||||
self.commands:add(KEY_FW_DOWN, nil, "joypad down",
|
||||
"pan "..self.shift_y.." pixels downwards",
|
||||
function(cr)
|
||||
cr:goto(cr.pos + cr.shift_y)
|
||||
end
|
||||
)
|
||||
end
|
||||
Reference in new issue
Block a user