voici un helloworld plus avancé avec un fond d'ecran
System.usbDiskModeActivate()green = Color.new(0, 255, 0)time = 0pi = math.atan(1) * 4background = Image.load("background.png")while true do screen:blit(0, 0, background, 0, 0, background:width(), background:height(), false) x = math.sin(pi * 2 / 360 * time) * 150 + 192.5 screen:print(x, 100, "Hello World!", green) time = time + 1 if time >= 360 then time = 0 end screen.waitVblankStart() screen.flip() pad = Controls.read() if pad:start() then break endend
Pour ajouter le fond d'ecran il vous faudra juste rajouter
background = Image.load("background.png")
et éditer ceci :
while true do screen:blit(0, 0, background, 0, 0, background:width(), background:height(),
Il vous faudra mettre une image du nom background.png dans le meme repertoire 480*272