Your repeat/until loop refreshes the screen each frame so your text is wiped. Just put the text commands inside the loop so they get re-written each frame.
Edit Something like this should work (which should run on its own):
//
// Display the main game menu
//
sync on ` you need this to take control of syncing
global objBonusContainer = 1
global sprRongTitle = 1
global imgRongTitle = 1
global centreX
global centreY
global CAMERA_Z_POS = -400
centreX = screen width()/2
centreY = screen height()/2
make object cube 1, 50
cls rgb(255,0,0)
get image 1, 0, 0, 64, 64
sprite 1, 30, 30, 1
displayMenu()
end
function displayMenu()
draw to back ` this puts the text and sprite at the back
backdrop off ` this stops the 3D backdrop wiping out the text and sprite
cls 0; sync
// Play the intro music
` loop music mscIntro
show sprite sprRongTitle
set text opaque
ink RGB( 60, 60, 60 ), 0
set text size 32
set text size 16
// Position the camera far enough back to see the bonus container
position camera 0.0, 0.0, CAMERA_Z_POS
position object objBonusContainer, 0.0, -15.0, 0.0
show object objBonusContainer
ry# = 0.0
// Ensure there are no outstanding key presses
clear entry buffer
repeat
center text centreX, 120, "Any key to start"
center text centreX, 150, "Esc to Quit"
SPRITE sprRongTitle, centreX - ( SPRITE WIDTH( sprRongTitle ) / 2 ), centreY - SPRITE HEIGHT( sprRongTitle ), imgRongTitle
inc ry#
ry# = wrapvalue( ry# )
rotate object objBonusContainer, 0.0, ry#, 0.0
wait 20
sync
until scancode() <> 0
` stop music mscIntro
hide sprite sprRongTitle
hide object objBonusContainer
endfunction
Remove the
draw to back and
backdrop off commands if you want the text and sprite in front of the revolving object. You might need to turn the backdrop back (depends what else you are doing).