Fullscreen canvas

BlitzPlus Forums/BlitzPlus Programming/Fullscreen canvas

Zster(Posted 2003) [#1]
Just curious

I know Mark mentioned something in his worklogs about menu’s and gadgets working in fullscreen but does anyone know how to do this? If I want to make a res of say 640x480 fullscreen do I have to use the “graphics” command or is there some way I can make a canvas fullscreen?

Thanks


Binary_Moon(Posted 2003) [#2]
I think you use the graphics to make the game full screen command and then create a window.


okee(Posted 2003) [#3]
something like this should do it....

Global dx = GadgetWidth(Desktop()) 		; get the desktop size
Global dy = GadgetHeight(Desktop()) 	; get the desktop size

Global winMain = CreateWindow("",0,0,dx,dy,0,0)

Global Canvas = CreateCanvas(0,0,GadgetWidth(winMain),GadgetHeight(winMain),winMain)
btnNext = CreateButton("Hello",200,200,300,300,Canvas)	
SetBuffer CanvasBuffer(Canvas)

; main loop
Repeat

	id = WaitEvent()
		Select id

			Case $103: End
 
		End Select

Forever



Binary_Moon(Posted 2003) [#4]
I think this is what he meant, proper full screen as opposed to full screen that fills the screen but is still in the screen... or something :)

Graphics 640,480,16

ShowPointer

win=CreateWindow("Test Window",5,5,100,100)
button=CreateButton("Test Button",5,5,60,20,win)

Repeat

	Select WaitEvent()
	Case $803 End
	End Select

Until KeyHit(1)

End



okee(Posted 2003) [#5]
Ben have you tried that code ? It opens in full screen then displays a window with a button in it.


soja(Posted 2003) [#6]
Sure, but it does it at whatever resolution your desktop is at.


skidracer(Posted 2003) [#7]
hint: debug mode needs Graphics 640,480,16,1


Zster(Posted 2003) [#8]
Hi All

Yeah thanks Ben that's exactly what I wanted. Should have worked that out for myself

Thanks