returnfalse-- don't consume swipe event if it's not matched
end
powerd:setWarmth(warmth)
self:onShowWarmth()
returntrue
end
functionKoboLight:addToMainMenu(menu_items)
menu_items.frontlight_gesture_controller={
text=_("Frontlight gesture controller"),
callback=function()
localimage_name
localnl_text=""
ifwith_natural_lightthen
image_name="/demo_ka1.png"
nl_text=_("\n- Change frontlight warmth by swiping up or down on the right of the screen.")
else
image_name="/demo.png"
end
localimage=ImageWidget:new{
file=self.path.."/demo.png",
file=self.path..image_name,
height=Screen:getHeight(),
width=Screen:getWidth(),
scale_factor=0,
}
UIManager:show(image)
UIManager:show(ConfirmBox:new{
text=T(_("Frontlight gesture controller can:\n- Turn on or off frontlight by tapping bottom left of the screen.\n- Change frontlight intensity by swiping up or down on the left of the screen.\n\nDo you want to %1 it?"),
text=T(_("Frontlight gesture controller can:\n- Turn on or off frontlight by tapping bottom left of the screen.\n- Change frontlight intensity by swiping up or down on the left of the screen."..nl_text.."\n\nDo you want to %1 it?"),