Code: Select all
ystem.usbDiskModeActivate()
white = Color.new(255,255,255)
black = Color.new(0,0,0)
startbar = Image.load("./images/startbar.png")
wallpaper = Image.load("./images/wallpaper.png")
cursor = Image.load("./images/cursor.png")
taskbar = Image.load("./images/taskbar.png")
startbarlist = Image.load("./images/startbarlist.png")
startbarmouseover = Image.load("./images/startover.png")
startbarpushed = Image.load("./images/startpushed.png")
pointer_x = 480/2
pointer_y = 272/2
timefont = Font.createProportional()
timefont:setPixelSizes(0,10)
while true do
function startbar_()
screen:blit(0,244,startbarpushed)
screen:blit(0,1,startbarlist)
return
end
pad = Controls.read()
dx = pad:analogX()
dy = pad:analogY()
if math.abs(dx) > 32 then
pointer_x = pointer_x + dx / 32
if pointer_x > 479 then
pointer_x = 479
end
if pointer_x < 0 then
pointer_x = 0
end
end
if math.abs(dy) > 32 then
pointer_y = pointer_y + dy / 32
if pointer_y > 479 then
pointer_y = 479
end
if pointer_y < 0 then
pointer_y = 0
end
end
screen:blit(0,0,wallpaper)
screen:blit(0,245,startbar)
screen:blit(368,245,taskbar)
time = os.date("%I:%M %p")
screen:fontPrint(timefont,425,263,time)
if pad:cross() and pointer_x < 95 and pointer_x >= 0 and pointer_y > 246 and pointer_y < 273 then
startbar_()
end
screen:blit(pointer_x, pointer_y, cursor)
screen.flip()
if pad:start() then break end
if pad:select() then screen:save("screenshot.jpg") end
seconds=25
end