How do I add a delay to my menu system and clear the screen to remove old text???
-- SCREEN ARRAYS --
SCREEN_BOTTOM = 0
LOOPON = 1
MENU = 0
MENU_OPTION = 1
-- THIS SETS THE BOTTOM SCREEN UP --
BGBotText = Screen.LoadTextBG()
Screen.Initialize( SCREEN_BOTTOM, BGBotText )
-- INFO TEXT --
while true do
BGBotText:SetColor( 200, 0, 200, 0 )
BGBotText:PrintXY( 0, 19, "Touch the screen to continue... ")
if LOOPON == 1 and Stylus.Down() then
LOOPON = 0
MENU = 1
BGBotText:SetColor( 200, 0, 200, 0 )
BGBotText:PrintXY( 0, 16, "Menu System made by ")
BGBotText:PrintXY( 0, 17, " Leighton :D")
end
if Stylus.Down() then
MENU = 1
end
-- Open the Menu (TEXT PART) --
if MENU == 1 then
BGBotText:SetColor( 150, 0, 150, 0 )
BGBotText:PrintXY( 4, 1, "A Menu by" )
BGBotText:PrintXY( 0, 2, "Leighton Williams" )
end
if Pads.Up() then
MENU_OPTION = MENU_OPTION - 1
end
if Pads.Down() then
MENU_OPTION = MENU_OPTION + 1
end
if MENU_OPTION == 1 then
BGBotText:SetColor ( 5 )
BGBotText:PrintXY( 0, 10, "START MUSIC" )
BGBotText:SetColor ( 4 )
BGBotText:PrintXY( 0, 11, "PAUSE MUSIC" )
BGBotText:SetColor ( 4 )
BGBotText:PrintXY( 0, 12, "STOP MUSIC" )
end
if MENU_OPTION == 2 then
BGBotText:SetColor ( 4 )
BGBotText:PrintXY( 0, 10, "START MUSIC" )
BGBotText:SetColor ( 5 )
BGBotText:PrintXY( 0, 11, "PAUSE MUSIC" )
BGBotText:SetColor ( 4 )
BGBotText:PrintXY( 0, 12, "STOP MUSIC" )
end
if MENU_OPTION == 3 then
BGBotText:SetColor ( 4 )
BGBotText:PrintXY( 0, 10, "START MUSIC" )
BGBotText:SetColor ( 4 )
BGBotText:PrintXY( 0, 11, "PAUSE MUSIC" )
BGBotText:SetColor ( 5 )
BGBotText:PrintXY( 0, 12, "STOP MUSIC" )
end
if MENU_OPTION == 0 then
MENU_OPTION = 1
end
if MENU_OPTION == 4 then
MENU_OPTION = 3
end
if LOOPON == 2 then
break
end
Screen.WaitForVBL()
end
Anyway, this was my first proper attempt at DSLua and I can be sure that "while true do" is much better than "loop", Thanks for that Daltonlaffs.

Oh, I also think that a could have tried to make the code a bit smaller.