i have this function here that brings up a menu when you hit the f1 key:
function menu()
`bringing up the menu, the text is palatino or something like it
load image "menu1.bmp",1
draw to front
sprite 1,screen width()/2,screen height()/2,1
stretch sprite 1,550,550
paste sprite 1,screen width()/2,screen height()/2
`loop for menu selections
do
`the exit game sequence
if escapekey() = 1
hide sprite 1
center text screen width()/2, screen height()/2,"Do you wish to exit (y/n)?"
`if a "y" is entered
if keystate(21) = 1 then end
`if a "n" was entered
if keystate(49) = 1 then exit
endif
`for windowed mode
if keystate(17) = 1
set window on
set window layout 1,1,1
set window position (screen width()/4),(screen height()/4)
set window title "Exile's Journey"
position mouse (screen width()/4),(screen height()/4)
hide mouse
endif
`to exit the menu
if keystate(59) = 1
hide sprite 1
delete sprite 1
delete image 1
exit
endif
loop
endfunction menu
and in my game loop i have the command if keystate(59) = 1 then menu()
now when i hit the f1 key, i don't see my menu, and i still have control of my game, as if the loop in my function isn't working. i tried the same code out as a subroutine but i got the same results. the .bmp for my menu is in my projects folder. what do i need to do? thanx in advance.
man, i got more problems with this. o.k. i tried the thing again. i have to hold down the f1 key to get my menu commands to work, but i still don't see the menu, and when i switch to windowed mode from my 'menu', i get the window but my game is gone! so i compiled the code into an exe to try it out, and when i did the windowed mode from the menu, i could see my objects and world, but all of my textures were gone! what's up with this?
You're ate up like a soup sandwich.