0 Members and 1 Guest are viewing this topic.
Could anybody help me out with a screen selectorid like to start by asking full screen or windowed b4 i start the introCode: [Select]Graphics 640,480 , 16 ,2selected=1SetBuffer BackBuffer()While Not KeyHit(1)ClsIf selected-1EndIfEndIfIf KeyHit(208) ThenIf selected=2 Thenselected=1Elseselected=selected +1EndIfEndIfIf selected=1 ThenText 250,330, "> Full screen 250,345, " Windowed "Text 210,370,"Use cursor up/down then press"Text 210,380,"enter to choose screen size"Text 210,390,"Then hit ESC to start demo"If KeyHit(28) Or KeyHit(156) Then choice = 1EndIfIf selected=2 ThenText 250,330, " Full screen "Text 250,345, "> Windowed 210,370, "Use cursor up/down then press"Text 210,380, "enter to choose screen size"Text 210,390, "Then hit ESC to start demo"If KeyHit(28) Or KeyHit(156) Then choice = 2EndIfFlipWendThis is the code i have but after selecting screen size you press enter and then have to press escape to continue. how could i just select option then hit enter and continue ?Code: [Select]Graphics 800,600,16,choiceSetBuffer BackBuffer()While Not KeyHit(1)Text 300,300,"HELLO"FlipWend
Graphics 640,480 , 16 ,2selected=1SetBuffer BackBuffer()While Not KeyHit(1)ClsIf selected-1EndIfEndIfIf KeyHit(208) ThenIf selected=2 Thenselected=1Elseselected=selected +1EndIfEndIfIf selected=1 ThenText 250,330, "> Full screen 250,345, " Windowed "Text 210,370,"Use cursor up/down then press"Text 210,380,"enter to choose screen size"Text 210,390,"Then hit ESC to start demo"If KeyHit(28) Or KeyHit(156) Then choice = 1EndIfIf selected=2 ThenText 250,330, " Full screen "Text 250,345, "> Windowed 210,370, "Use cursor up/down then press"Text 210,380, "enter to choose screen size"Text 210,390, "Then hit ESC to start demo"If KeyHit(28) Or KeyHit(156) Then choice = 2EndIfFlipWend
Graphics 800,600,16,choiceSetBuffer BackBuffer()While Not KeyHit(1)Text 300,300,"HELLO"FlipWend
Try this out. It probably does more than you need but you can just use the window selection gadget. Hope this helps.Code: [Select]intModes=CountGfxModes() Dim scn_width( 255 )Dim scn_height( 255 )Dim scn_depth( 255 )window = 1i = 1For t = 1 To intModes scn_width(t) = GfxModeWidth(t) scn_height(t)= GfxModeHeight(t) scn_depth(t) = GfxModeDepth(t) Next SetBuffer BackBuffer() ClsColor 155,100,100:Flip:Cls While Not KeyDown( 28 ) If KeyHit( 200 ) Then i = i + 1 If i > intModes i = 1 Cls End If If KeyHit( 208 ) Then i = i - 1 If i < 1 i = intModes Cls End If If KeyHit( 205 ) Then window = window + 1:Cls If window = 1 Then onoff$ = "full " If window = 2 Then onoff$ = "window " If window = 3 Then onoff$ = "scaled window " If window > 3 window = 1: onoff$ = "full" :Cls Color 0,0,0 Text 10,3,"Use u/d arrow keys for res and color depth"Text 10,23,"Use rt arrow key for window modes"Text 10,40,"Enter to select"Text 10,60,"Width= " + scn_width(i)Text 10,80,"Height= " + scn_height(i)Text 10,100,"Depth= " + scn_depth(i)Text 10,120,"Window= " + onoff$Color 255,255,255Text 11,2,"Use u/d arrow keys for res and color depth"Text 10,22,"Use rt arrow key for window modes"Text 11,39,"Enter to select"Text 11,59,"Width= " + scn_width(i)Text 11,79,"Height= " + scn_height(i)Text 11,99,"Depth= " + scn_depth(i)Text 11,119,"Window= " + onoff$ demo_sw = scn_width(i) demo_sh = scn_height(i) demo_depth = scn_depth(i) demo_window = window FlipWendCode: [Select]Graphics demo_sw,demo_sh,demo_depth,demo_window SetBuffer BackBuffer() ClsColor 155,100,100:Flip:Cls While Not KeyDown(1)Text 20,20,"NEW SCREEN----------------------"Text 20,40," fantastic demo goes here :) "FlipClsWendEnd
intModes=CountGfxModes() Dim scn_width( 255 )Dim scn_height( 255 )Dim scn_depth( 255 )window = 1i = 1For t = 1 To intModes scn_width(t) = GfxModeWidth(t) scn_height(t)= GfxModeHeight(t) scn_depth(t) = GfxModeDepth(t) Next SetBuffer BackBuffer() ClsColor 155,100,100:Flip:Cls While Not KeyDown( 28 ) If KeyHit( 200 ) Then i = i + 1 If i > intModes i = 1 Cls End If If KeyHit( 208 ) Then i = i - 1 If i < 1 i = intModes Cls End If If KeyHit( 205 ) Then window = window + 1:Cls If window = 1 Then onoff$ = "full " If window = 2 Then onoff$ = "window " If window = 3 Then onoff$ = "scaled window " If window > 3 window = 1: onoff$ = "full" :Cls Color 0,0,0 Text 10,3,"Use u/d arrow keys for res and color depth"Text 10,23,"Use rt arrow key for window modes"Text 10,40,"Enter to select"Text 10,60,"Width= " + scn_width(i)Text 10,80,"Height= " + scn_height(i)Text 10,100,"Depth= " + scn_depth(i)Text 10,120,"Window= " + onoff$Color 255,255,255Text 11,2,"Use u/d arrow keys for res and color depth"Text 10,22,"Use rt arrow key for window modes"Text 11,39,"Enter to select"Text 11,59,"Width= " + scn_width(i)Text 11,79,"Height= " + scn_height(i)Text 11,99,"Depth= " + scn_depth(i)Text 11,119,"Window= " + onoff$ demo_sw = scn_width(i) demo_sh = scn_height(i) demo_depth = scn_depth(i) demo_window = window FlipWend
Graphics demo_sw,demo_sh,demo_depth,demo_window SetBuffer BackBuffer() ClsColor 155,100,100:Flip:Cls While Not KeyDown(1)Text 20,20,"NEW SCREEN----------------------"Text 20,40," fantastic demo goes here :) "FlipClsWendEnd
Hi codeman, check this code to see if it can help you.Code: [Select]Graphics 640,480,32,2SetBuffer BackBuffer()choice = 1While Not KeyHit( 28 ) Cls Select choice Case 1: Text 250,330, "> Full Screen" Text 250,345, " Windowed" Case 2: Text 250,330, " Full Screen" Text 250,345, "> Windowed" End Select Text 210,370,"Use cursor up/down then press" Text 210,380,"enter to choose screen size" If KeyHit( 200 ) Then choice = 1 If KeyHit( 208 ) Then choice = 2 FlipWendCode: [Select]Graphics 800,600,32,choiceSetBuffer BackBuffer()While Not KeyHit(1) Text 300,300,"HELLO" FlipWend
Graphics 640,480,32,2SetBuffer BackBuffer()choice = 1While Not KeyHit( 28 ) Cls Select choice Case 1: Text 250,330, "> Full Screen" Text 250,345, " Windowed" Case 2: Text 250,330, " Full Screen" Text 250,345, "> Windowed" End Select Text 210,370,"Use cursor up/down then press" Text 210,380,"enter to choose screen size" If KeyHit( 200 ) Then choice = 1 If KeyHit( 208 ) Then choice = 2 FlipWend
Graphics 800,600,32,choiceSetBuffer BackBuffer()While Not KeyHit(1) Text 300,300,"HELLO" FlipWend
Cheers guys for the reply @ Alieneye0 ...cheers for ya help m8 but couldnt get it to work , just crashed me blitz .. Appreciate the help thou m8@ Rbraz .. Excellent m8 just what i wanted ...CoDeMaN