From 5e6d4cfdb3d58f03b615720801360704765abe2b Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Sat, 21 Apr 2012 16:08:25 +0800 Subject: [PATCH] fix message for gamma settings in crereader's help page --- crereader.lua | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/crereader.lua b/crereader.lua index d686056b4..8b0f14a4f 100644 --- a/crereader.lua +++ b/crereader.lua @@ -428,18 +428,15 @@ function CREReader:adjustCreReaderCommands() end end ) - self.commands:add(KEY_VPLUS, nil, "vol+", - "increase gamma", - function(self) - cre.setGammaIndex(self.gamma_index + 1) - self.gamma_index = cre.getGammaIndex() - self:redrawCurrentPage() - end - ) - self.commands:add(KEY_VMINUS, nil, "vol-", - "decrease gamma", - function(self) - cre.setGammaIndex(self.gamma_index - 1) + self.commands:addGroup("vol-/+", + {Keydef:new(KEY_VPLUS,nil), Keydef:new(KEY_VMINUS,nil)}, + "decrease/increase gamma", + function(self, keydef) + local delta = 1 + if keydef.keycode == KEY_VMINUS then + delta = -1 + end + cre.setGammaIndex(self.gamma_index+delta) self.gamma_index = cre.getGammaIndex() self:redrawCurrentPage() end