well ive tought of that, but it didnt work either!
here's my code to the settings menu:
settings:
backdrop off
autocam on
for a = 5 to 13
set object a,1,0,1,1,0,0,0
next a
`restore values for Settings
open to read 1,"settings.dat"
read string 1,a$ : resolution=val(a$)
read string 1,a$ : display=val(a$)
read string 1,a$ : texture=val(a$)
read string 1,a$ : sound=val(a$)
close file 1
draw to back
`load images and background
load image "main menu/settings/settings.bmp",200
load image "buttons/settings/save.bmp",1100
load image "buttons/settings/save selected.bmp",1200
load image "buttons/settings/cancel.bmp",1300
load image "buttons/settings/cancel selected.bmp",1400
load image "buttons/settings/default.bmp",1500
load image "buttons/settings/default selected.bmp",1600
load bitmap "main menu\bgunactive.bmp"
`make object plain 1,1.46,1.60 : set object 1,1,0,1,1,0,0,0 : position object 1,0.125,0.199,0 : texture object 1,200 : disable object zdepth 1
`loading original settings from file
if resolution=0 then show object 5 : hide object 6 : hide object 7 : position object 5,-0.169,0.559,-0.1
if resolution=1 then show object 6 : hide object 5 : hide object 7 : position object 6,-0.17,0.483,-0.1
if resolution=2 then show object 7 : hide object 5 : hide object 6 : position object 7,-0.170,0.402,-0.1
if display=0 then show object 8 : hide object 9 : position object 8,-0.169,0.151,-0.1
if display=1 then show object 9 : hide object 8 : position object 9,-0.17,0.069,-0.1
if texture=0 then show object 10 : hide object 11 : position object 10,-0.17,-0.193,-0.1
if texture=1 then show object 11 : hide object 10 : position object 11,0.297,-0.193,-0.1
if sound=0 then show object 12 : hide object 13 : position object 12,-0.17,-0.425,-0.1
if sound=1 then show object 13 : hide object 12 : position object 13,0.297,-0.425,-0.1
do
paste image 200,200,40
paste image 1300,200,355
paste image 1100,304,355
paste image 1500,400,355
`*************************************RESOLUTION
`640
if mousex()>=279 and mousex()<=376 and mousey()>=117 and mousey()<=130
if mouseclick()=1
show object 5 : hide object 6 : hide object 7 : resolution=0
position object 5,-0.17,0.559,-0.1
endif
endif
`800
if mousex()>=279 and mousex()<=376 and mousey()>=131 and mousey()<=150
if mouseclick()=1
show object 6 : hide object 5 : hide object 7 : resolution=1
position object 6,-0.17,0.483,-0.1
endif
endif
`1024
if mousex()>=279 and mousex()<=376 and mousey()>=151 and mousey()<=170
if mouseclick()=1
show object 7 : hide object 5 : hide object 6 : resolution=2
position object 7,-0.17,0.402,-0.1
endif
endif
show object 5+resolution
`************************************DISPLAY MODES
`3dhardware
if mousex()>=279 and mousex()<=455 and mousey()>=202 and mousey()<=216
if mouseclick()=1
show object 8 : hide object 9 : display=0
position object 8,-0.169,0.151,-0.1
endif
endif
`3dsoftware
if mousex()>=279 and mousex()<= 433 and mousey()>=220 and mousey()<=232
if mouseclick()=1
show object 9 : hide object 8 : display=1
position object 9,-0.17,0.069,-0.1
endif
endif
show object 8+display
`**********************************TEXTURE DEPTH
`16 bit
if mousex()>= 279 and mousex()<=340 and mousey()>=274 and mousey()<=288
if mouseclick()=1
show object 10 : hide object 11 : texture=0
position object 10,-0.17,-0.193,-0.1
endif
endif
`32 bit
if mousex()>=376 and mousex()<=440 and mousey()>=274 and mousey()<=288
if mouseclick()=1
show object 11 : hide object 10 : texture=1
position object 11,0.297,-0.193,-0.1
endif
endif
show object 10+texture
`************************************SOUND
`ON
if mousex()>=279 and mousex()<=326 and mousey()>=323 and mousey()<=337
if mouseclick()=1
show object 12 : hide object 13 : sound=0
position object 12,-0.17,-0.425,-0.1
endif
endif
`OFF
if mousex()>=376 and mousex()<=425 and mousey()>=323 and mousey()<=337
if mouseclick()=1
show object 13 : hide object 12 : sound=1
position object 13,0.297,-0.425,-0.1
endif
endif
show object 12+sound
`**************************************TRANSACTION BUTTONS
` cancel
if mousex()>=202 and mousex()<=291 and mousey()>=355 and mousey()<=377
paste image 1400,200,355
if mouseclick()=1
`hide radio buttons "objects"
for a = 5 to 13
hide object a
next a
goto main_menu
else
paste image 1300,200,355
endif
endif
`default
if mousex()>=403 and mousex()<=491 and mousey()>=355 and mousey()<=377
paste image 1600,400,355
if mouseclick()= 1
show object 5 : hide object 6 : hide object 7 : position object 5,-0.169,0.559,-0.1 : Resolution=0
show object 8 : hide object 9 : position object 8,-0.169,0.151,-0.1 : display=0
show object 10: hide object 11: position object 10,-0.17,-0.193,-0.1: texture=0
show object 12: hide object 13: position object 12,-0.17,-0.425,-0.1: sound=0
endif
else
paste image 1500,400,355
endif
`save
if mousex()>=307 and mousex()<=385 and mousey()>=355 and mousey()<=377
paste image 1200,304,355
if mouseclick()=1
delete file "settings.dat"
open to write 1,"settings.dat"
a$=str$(resolution) : write string 1,a$
a$=str$(display) : write string 1,a$
a$=str$(texture) : write string 1,a$
a$=str$(sound) : write string 1,a$
close file 1
`hide radio buttons "objects"
for a = 5 to 13
hide object a
next a
goto main_menu
endif
endif
sync
loop
and here's the window that selects a map
repeat
filter1$=".map" : filter2$=""
_fichierchoisi=_File_Selector_v1(_mappath$,filter1$,filter2$)
if _fichierchoisi=1
_dossierfinal$="C:\WINDOWS\Desktop\Levels\Maps"
`fileselector$(8)
_fichierfinal$=fileselector$(9)
if _fichierfinal$="mission1.map" then goto mission1
if _fichierfinal$="mission2.map" then goto mission2
endif
goto main_menu
sync
until _fichierchoisi=1
the GOTO MAIN_MENU syntax is that when i press the cancel it takes me back to the main menu.
i hope someone discovers something!
thankx
‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)