-- Windows All Programs StartMenu
-- All Programs StartMenu for Windows Vista 
-- Copyright © 2008/2009 

-- variables
done2 = false

-- images
allprograms = Image.load("WINDOWS/System32/Explorer/Allprogs/allprograms.png")
returns = Image.load("WINDOWS/System32/Explorer/Allprogs/returns.png")
demarrer_act = Image.load("WINDOWS/System32/Explorer/Startmenu2/demarrer.png")
oldpad = Controls.read()

-- programme
while done2 == false do
pad = Controls.read()

-- mouvements du curseur
dofile("WINDOWS/System32/WinCursor/cursor.lua")

-- définition des images
screen:blit(0,0,allprograms)
screen:blit(0,242,demarrer_act)

-- définition des boutons
   --démarrer
if cursorx > 8 and cursorx < 149 and cursory > 183 and cursory < 205 and pad:cross() and oldpad:cross() ~= pad:cross() then
   allprogs = nil
   demarrer_act = nil
   oldpad = nil
   done2 = true
end


-- limites
if cursorx > 364 then
   cursorx = 363
end
if cursory > 216 and cursorx > 119 then
   cursory = 215


-- fin du programme
screen:blit(cursorx,cursory,cursor)
screen.waitVblankStart()
screen.flip()
oldpad = pad
end
