violet = Image.load("couleurs/Violet.png")

statut = 0
  
oldpad = Controls.read()

while true do
  screen:clear()
  pad = Controls.read()

  screen:blit(0,0,violet)
  
  if pad:select() and oldpad:select() ~= pad:select() then
    statut = 1
  elseif statut == 1 then
    screen:print(202,175,"Chargement",Color.new(255,255,255))
    statut = 2
  elseif statut == 2 then
    dofile("lumiere.lua")
  elseif pad:cross() then
    dofile("psplight.lua")
  elseif pad:triangle() then
    System.Quit()
  end

  screen.waitVblankStart()
  screen:flip()
  oldpad = pad
end
