add "awaken now" to menu
This commit is contained in:
parent
d4b1dc4c35
commit
ab370c9489
10
vacation.p8
10
vacation.p8
@ -257,6 +257,13 @@ end
|
||||
function arm_awakener()
|
||||
awakener_hold_frames=0
|
||||
awakener_armed=true
|
||||
menuitem(1, "awaken now", awaken_now)
|
||||
end
|
||||
|
||||
function awaken_now()
|
||||
exit_dither = ditherer.new{di=1}
|
||||
awakener_armed = false
|
||||
menuitem(1)
|
||||
end
|
||||
|
||||
function _update60()
|
||||
@ -267,8 +274,7 @@ function _update60()
|
||||
awakener_hold_frames = 0
|
||||
end
|
||||
if awakener_hold_frames == 90 then
|
||||
exit_dither = ditherer.new{di=1}
|
||||
awakener_armed = false
|
||||
awaken_now()
|
||||
end
|
||||
end
|
||||
if exit_dither and exit_dither:update() then
|
||||
|
Loading…
Reference in New Issue
Block a user