add: vertical pan in crereader

pull/2/merge
Qingping Hou 12 years ago
parent 5e58a94632
commit 3992fdca0f

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

Loading…
Cancel
Save