I know I have seen this topic up on the forums before and heres one way of getting it done.
I had posted a code simaler to this in Genral descussion to see if doing things this way is Ok and so far it seems so.
Gona put it in Code archives for others to use but figured Id put it here first to see if anybody finds somthing wrong with it first.
Const Init=1
Const start=2
Const Run=3
Const Restart=4
Const Close=5
Global winX,winY,WinD,WinM
State=init
While Not State=Close
Select State
Case Init
WinX=640
WinY=480
WinD=16
WinM=2
State=start
Case start
Graphics winX,winY,WinD,WinM
Img=CreateImage(256,256)
SetBuffer ImageBuffer( Img )
Color 255,128,64
Rect 0,0,256,256,1
Color 255,255,0
Oval 128,128,128,128,0
SetBuffer BackBuffer()
state=Run
Case Run
Cls
If KeyHit(1) state=Close
If KeyHit(57) state=Restart
DrawImage Img,0,0
Text 280,200,"To Change Graphics Press SpaceBar"
Text 280,240," Curent Setting : "+Winx+","+Winy+","+Wind+","+Winm
Text 280,280," Press ESC to EXIT "
If state=restart
Color 255,0,0
Text 280,100," 1=640,480,16,2 "
Text 280,120," 2=800,600,32,1 "
End If
Flip
Case Restart
ClearWorld
Color 255,255,255
Locate 280,160
NewG=Input( "change graphics to 1 or 2 " )
If NewG=1
WinX=640
WinY=480
WinD=16
WinM=2
Else If NewG=2
WinX=800
WinY=600
WinD=32
WinM=1
End If
state=start
Case Close
ClearWorld()
Default
End
End Select
Wend
End
|