Fullscreen canvas
BlitzPlus Forums/BlitzPlus Programming/Fullscreen canvas
| ||
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 |
| ||
I think you use the graphics to make the game full screen command and then create a window. |
| ||
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 |
| ||
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 |
| ||
Ben have you tried that code ? It opens in full screen then displays a window with a button in it. |
| ||
Sure, but it does it at whatever resolution your desktop is at. |
| ||
hint: debug mode needs Graphics 640,480,16,1 |
| ||
Hi All Yeah thanks Ben that's exactly what I wanted. Should have worked that out for myself Thanks |