Hi All
Making this and would like others to tell me how many graphic options they come up with on there machines, on my machine I get 40.
If you get more or less then I may need to make and option sizer.
or a way to venely speared them across the screeen.
see what you think and when worked out how it goes if there is an easer way could you show me how.
TIA
Rem Project: GUIMaker
Rem Created: 3/25/2005 8:33:13 PM
Rem ***** Main Source File *****
rem Standard Setup Code
sync on : sync rate 0 :
color backdrop rgb(0,0,128)
set text font "arial" : set text size 12 : set text transparent
global choice `this makes choice a global variable meaning that when used in a function is the same variable as if it wasnt used in one.
choice=0 `the choice variable will be used to tell which button is clicked.
global screensize$ sz
set text size 12
gosub screensize
gosub checkdisplaymodes
do
gosub title
gosub screenbox
sync
loop
screenbox:
ink RGB(0,128,64),0
line 3,55,screen width()-3,55
line screen width()-3,55,screen width()-3,170
line 3,170,screen width()-3,170
line 3,55,3,170
ink RGB(0,128,0),0
center text screen width()/2,55,"Pick Screen Size"
boxes() ` this functin draws the boxes
choose() `runs the function that lets you chose one of the boxes
return
function boxes()
for a=1 to sz/4 `this creates a loop that will run 18 times and have a stast at 1 and go to 18
if choice=a
ink rgb(0,0,255),0 `if the button is the chosen button change the ink color
else
ink rgb(255,0,0),0
endif
box 10,50+a*10+10,20,50+a*10+15
text 30,50+a*10+5,screensize$(a)
next a
for a=sz/4+1 to sz/2 `this creates a loop that will run 18 times and have a stast at 1 and go to 18
if choice=a
ink rgb(0,0,255),0 `if the button is the chosen button change the ink color
else
ink rgb(255,0,0),0
endif
box 150,-50+a*10+10,160,-50+a*10+15
text 170,-50+a*10+5,screensize$(a)
next a
for a=sz/2+1 to sz-(sz/4) `this creates a loop that will run 18 times and have a stast at 1 and go to 18
if choice=a
ink rgb(0,0,255),0 `if the button is the chosen button change the ink color
else
ink rgb(255,0,0),0
endif
box 290,-150+a*10+10,300,-150+a*10+15
text 310,-150+a*10+5,screensize$(a)
next a
for a=sz-(sz/4)+1 to sz `this creates a loop that will run 18 times and have a stast at 1 and go to 18
if choice=a
ink rgb(0,0,255),0 `if the button is the chosen button change the ink color
else
ink rgb(255,0,0),0
endif
box 290+140,-250+a*10+10,300+140,-250+a*10+15
text 310+140,-250+a*10+5,screensize$(a)
next a
endfunction
function choose()
rem block1
my=mousey() `sets the variable my equal to the mouses y position
if mousex()=>10 and mousex()=<20 `checks to see if the mouses x position is in the range of the buttons. no need in running code if it isint needed
`ch=1
for a=1 to sz/4 `starts a for loop that starts at 1 and runs untill it is at 18
if my=>50+a*10+10 and my=<50+a*10+15 `check to see if the mouses y position is at button 1-18 since it checks 1 each loop and then checks the next
if mouseclick()=1 `if you also have the mouse clicked
choice=a `make choice equal to the button you clicked on
`everything below this is just closing the tags above it
endif
endif
inc ch
next a
endif
rem block2
my=mousey() `sets the variable my equal to the mouses y position
if mousex()=>150 and mousex()=<160 `checks to see if the mouses x position is in the range of the buttons. no need in running code if it isint needed
`ch=11
for a=sz/4+1 to sz/2 `starts a for loop that starts at 1 and runs untill it is at 18
if my=>50+(a-10)*10+10 and my=<50+(a-10)*10+15 `check to see if the mouses y position is at button 1-18 since it checks 1 each loop and then checks the next
if mouseclick()=1 `if you also have the mouse clicked
choice=a `make choice equal to the button you clicked on
`everything below this is just closing the tags above it
endif
endif
`inc ch
next a
endif
rem block3
my=mousey() `sets the variable my equal to the mouses y position
if mousex()=>290 and mousex()=<300 `checks to see if the mouses x position is in the range of the buttons. no need in running code if it isint needed
`ch=12
for a=sz/2+1 to sz-sz/4 `starts a for loop that starts at 1 and runs untill it is at 18
if my=>50+(a-20)*10+10 and my=<60+(a-20)*10+15 `check to see if the mouses y position is at button 1-18 since it checks 1 each loop and then checks the next
if mouseclick()=1 `if you also have the mouse clicked
choice=a `make choice equal to the button you clicked on
` `everything below this is just closing the tags above it
endif
endif
`inc ch
next a
endif
rem block4
my=mousey() `sets the variable my equal to the mouses y position
if mousex()=>430 and mousex()=<440 `checks to see if the mouses x position is in the range of the buttons. no need in running code if it isint needed
`ch=12
for a=sz-sz/4+1 to sz `starts a for loop that starts at 1 and runs untill it is at 18
if my=>50+(a-30)*10+10 and my=<60+(a-30)*10+15 `check to see if the mouses y position is at button 1-18 since it checks 1 each loop and then checks the next
if mouseclick()=1 `if you also have the mouse clicked
choice=a `make choice equal to the button you clicked on
` `everything below this is just closing the tags above it
endif
endif
`inc ch
next a
endif
text 20,20,str$(a)+"="+str$(choice)+" my="+str$(mousey())+" mx="+str$(mousex())
`if ch>=sz then ch=1
endfunction
title:
set text size 30
box 0,0,screen width(),screen height(),RGB(0,255,0),RGB(128,255,0),RGB(0,255,128),RGB(0,255,64)
box 1,1,screen width(),50,RGB(255,128,64),RGB(0,255,0),RGB(0,128,255),RGB(0,0,255)
box 3,3,screen width()-3,50-3,0,0,0,0
box 5,5,screen width()-5,50-5,RGB(255,128,64),RGB(0,255,0),RGB(0,128,255),RGB(0,0,255)
set text to bold
ink RGB(255,255,0),0
center text screen width()/2,10,"G.U.I. Maker."
set text size 14
set text to normal
text 200,20, " "+str$(sz)
return
screensize:
for s=1 to sz
screensize$(s)=checklist string$(s)
next sz
`data "320 x 200","320 x 240","400 x 300","480 x 360","512 x 384","640 x 400"
`data "640 x 480","800 x 600","960 x 720","1024 x 768","1152 x 864","1280 x 960"
`data "1280 x 1024","1600 x 900","1600 x 1200","1220 x 1080","1920 x 1200","Defualt"
return
checkdisplaymodes:
`print "DISPLAY MODES"
`print
perform checklist for display modes
for c=1 to checklist quantity()
width=checklist value a(c)
height=checklist value b(c)
depth=checklist value c(c)
` print "found:";checklist string$(c)
inc sz
next c
` gosub screensize
`set display mode width, height, depth
`if check display mode(width, height, depth)=1
`print "using:";width;" ";height;" ";depth
`endif
`Print "Press anykey"
`sync
`wait key
dim screensize$(sz)
global screensize$
for s=1 to sz
screensize$(s)=checklist string$(s)
next s
return
In Space No One can Hear You Scream! (When your comm Line is cut?)