TRZPDEYAE6S3FP7NKTNKQLECPVV2LRKGC7PJCC2MHPXDLU7CAABQC
4DJCRM2JZJDQMGNBLSKEZTL42DNWFF7ZM4FUR33OHYLZFTDA5MIQC
VZTOJS52BORPI34JWUWQFQEENTMZDLQHCCNZMFBQ6UWFLHE6X5GAC
4IBBQBYGBZDCXQO5C7H6UTWT67YJUJ7R6FH6UNHX4QGXOO47UUBQC
GVX7YSQYURPWFSUWVUAORZJTQBJURWWNBNUGEZYFAUMX3X5LSACQC
RRYPAAZARIX5ZIF5PDYPUDJP3VFMNYXIEGTUK4XCTZKIJRDPOD5AC
TWOCOTZPRAI2JQH6QY2ZBUZGYA53G7MCOSO64LBIO7OCVEHK7AGQC
X6AJODURS3K7O6ZNPOJLXFKI73E7OBRJRMBL66UHBDKFZXK4F6RAC
IMDZUX5WFBYCKZPYGVTSJPONI3ORUDNALX5A2BMUFK3JOZ6DHJWQC
-- level navigation
local ns, ps = tostring(curr_level+1), tostring(curr_level-1)
local nw, pw = App.width(ns)+10, App.width(ps)+10
local h = Line_height+10
local nx,px, y
if Safe_width > Safe_height then
px, nx = left-side-pw-10, left+lw*side+side+10
y = top + lh*side/2
else
px, nx = left+side+10, left+lw*side-side-nw-10
y = top-side-h-10
end
if curr_level > 1 then
button(ui_state, 'previous level', {x=px, y=y, w=pw, h=h,
bg=bg, onpress1=previous_level,
icon=function(p)
color(unpack(level_color))
g.print(ps, p.x+5, p.y+5)
end,
})
end
if curr_level < #levels then
button(ui_state, 'next level', {x=nx, y=y, w=nw, h=h,
bg=bg, onpress1=next_level,
icon=function(p)
color(unpack(level_color))
g.print(ns, p.x+5, p.y+5)
end,
})
end
function next_level()
if curr_level >= #levels then return end
curr_level = curr_level+1
level_state = load_level(levels[curr_level])
end
function previous_level()
if curr_level <= 1 then return end
curr_level = curr_level-1
level_state = load_level(levels[curr_level])
end