Do
if button(20,55,"New Game")=1 then goto New_game
if button(20,95,"Load Game")=1 then goto Load_game
if button(20,135,"Delete Existing Game") then goto Delete_game
if button(20,175,"Exit")=1 then end
loop
function button(x1,y1,menu_words$)
Pressed=0
x2=Text Width(menu_words$)
y2=Text Height(menu_words$)
if mousex()>x1 and mousex()<x1+x2
if mousey()>y1-y2 and mousey()<y1+y2
Pressed=1
endif
endif
if pressed=1 then ink rgb(255,0,0),0 else ink rgb(255,255,255),0
if pressed=1
Pressed=Mouseclick()
else
pressed = 0
endif
text x1,y1,menu_words$
endfunction pressed
New_game:
cls
ink rgb(255,255,255),0
print "What is the file name?"
input "Name of your game.",newgame$
print "Saving ";newgame$;" please wait."
open to write 1, newgame$
write string 1, newgame$
close file 1
open to read 1, newgame$
read string 1, newgame1$
close file 1
print newgame1$;" saved."
wait key
Load_game:
wait key
Delete_game:
How do I save a .ini file to a certain directory? I want my program to show all names of the games saved just like the Main Menu and when clicked, it will delete it. Any help would be greatly appreciated.
-Jim
Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com