Hi Folks, I am sure I'm doing something wrong... but I can't for the life of me figure out what. I'm creating a menu using text, when I try to remove that text using DeleteText though, nothing happens. I even tried using ClearScreen() to no avail.
Below is my code. loadMainMenu() is called once, before the main loop begins.
// Load main menu assets
function loadMainMenu()
// Load menu background image
CreateSprite(1,LoadImage("splashbackground.png"))
SetSpriteSize(1,100,100)
SetSpriteDepth(1,3)
// Load logo
CreateSprite(2,LoadImage("logo.png"))
SetSpriteSize(2,40,40)
SetSpriteDepth(2,2)
SetSpritePosition(2,30,5)
// Set up menu text
makeMenuText("Play",22,44,47)
makeMenuText("Scoreboard",23,34,57)
makeMenuText("Instructions",24,32,67)
makeMenuText("Options",25,39,77)
makeMenuText("Exit",26,44,87)
endfunction
// Unload main menu assets
function unloadMainMenu()
// Remove BG
DeleteSprite ( 1 )
// Remove logo
DeleteSprite ( 2 )
// Remove menu text
DeleteText ( 22 )
DeleteText ( 23 )
DeleteText ( 24 )
DeleteText ( 25 )
DeleteText ( 26 )
endfunction
// create menu text and position it on the screen
function makeMenuText(text$, num, posx, posy)
font = loadImage ("sfarchrival.png")
num = createText (text$)
setTextFontImage(num,font)
setTextSize(num,10)
setTextDepth(num,1)
setTextPosition(num,posx,posy)
endfunction
Can someone point me in the correct direction? Any help will be greatly appreciated.