2013-03-06 14:36:51 +00:00
|
|
|
|
|
|
|
ReaderScreenshot = InputContainer:new{}
|
|
|
|
|
|
|
|
function ReaderScreenshot:init()
|
|
|
|
local diagonal = math.sqrt(
|
2013-03-16 00:03:50 +00:00
|
|
|
math.pow(Screen:getWidth(), 2) +
|
2013-03-06 14:36:51 +00:00
|
|
|
math.pow(Screen:getHeight(), 2)
|
|
|
|
)
|
|
|
|
self.ges_events = {
|
|
|
|
Screenshot = {
|
|
|
|
GestureRange:new{
|
|
|
|
ges = "two_finger_tap",
|
2013-03-16 14:50:36 +00:00
|
|
|
scale = {diagonal - scaleByDPI(100), diagonal},
|
2013-03-06 14:36:51 +00:00
|
|
|
rate = 1.0,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
function ReaderScreenshot:onScreenshot()
|
|
|
|
os.execute("screenshot")
|
2013-03-07 10:06:18 +00:00
|
|
|
UIManager.full_refresh = true
|
2013-03-06 14:36:51 +00:00
|
|
|
return true
|
|
|
|
end
|
|
|
|
|