J'ai tout recommencé:
Voici mon ancien:
--Voici mon premier script !--Les Variables d'ÉcransSCREEN_TOP = 1SCREEN_BOTTOM = 0BGBotText = Screen.LoadTextBG()BGTopText = Screen.LoadTextBG()Screen.Initialize( SCREEN_BOTTOM, BGBotText )Screen.Initialize( SCREEN_TOP, BGTopText )--Les 2 textes indiquants le n° de l'écranBGBotText:PrintXY( 1, 1, "ECRAN DU BAS" )BGTopText:PrintXY( 1, 1, "ECRAN DU HAUT" )while true doif Stylus.X() >= 50 and Stylus.X() <= 70 and Stylus.Y() <= 150 and Stylus.Y() >= 100 thenBGBotText:PrintXY( 10, 10, "Vous pressez le bouton!" )--J'ai modifié les coordonnées pour ne pas que ce message interfère avec "ECRAN DU BAS" --Pour effacez le "Vous pressez le bouton!" si celui ci n'est plus presséelseBGBotText:PrintXY( 10, 10, " " )end--Attendre la pression d'une toucheif DSLua.WaitForAnyKey() thenbreakendend
Voici le nouveau:
-- Voici mon premier script !-- Variables d'ÉcransSCREEN_BOTTOM = 0SCREEN_TOP = 1BGTopText = Screen.LoadTextBG()BGBotText = Screen.LoadTextBG()Screen.Initialize( SCREEN_TOP, BGTopText )Screen.Initialize( SCREEN_BOTTOM, BGBotText )-- Boucle principale ~while true do -- "Vous appuyez sur l'écran !!" if Stylus.Down() then BGBotText:PrintXY( 2, 10, "Vous appuyez sur l'écran !!" ) BGTopText:PrintXY( 2, 10, Stylus.X()) BGBotText:SetColor( 5 ) else BGBotText:PrintXY( 2, 10, " " ) endend-- Fin de Boucle principale