Menu in graphics mode
BlitzPlus Forums/BlitzPlus Programming/Menu in graphics mode
| ||
I need to create a menu in graphics mode (800,600) and when the grahics mode is activated/created, blitzcc freeze. The only possibility to escape is killing the blitzcc task. Menu functions are GDI functions, and Graphics are from Directx. The GDI function CAN use a Directx screen to use all GDI function but it don't seen to work with BlitzPlus. Why ? And how to pass this problem ? Is there any other option/command to create a menu in graphics mode ? |
| ||
Is it fullscreen? If not, just use the GUI functions to create a window, then a canvas for all your graphics stuff. And then you can have a menubar on the window. |
| ||
Hello Jimbob. No, in window mode graphics. I need to use graphics instructions for sprites/tiles management/creations. There seem no possibility to use graphics commands in the canvas like Loadimage, plot, line, ect... with BB+ But i know that is possible to mix GDI command in a DirectX window because there is a lot of games/emulators/editors (programmed with Delphi or C++-Compilers) that use it. My books about DirectX programming say it too. RPG Maker 2000 for example programmed with Delphi use this option to create a window with Menu and the map-editor inside, with left a zone for list of objects and one or more windows for palette of tiles. This is exactly what i need for my program of Game-Creator. Is there any possibility to do it ? Or BB+ is only a restricted graphics OR GUI devellopment compiler ? |
| ||
There seem no possibility to use graphics commands in the canvas like Loadimage, plot, line, ect... with BB+ Maybe you're just not doing it right? Try this example: ; Create GUI Global wndMain = CreateWindow("Blitz Window", 100, 100, 200, 200) Global lblMain = CreateLabel("Hello from BlitzPlus", 5, 5, 120, 20, wndMain) Global canMain = CreateCanvas(5, 30, ClientWidth(wndMain)-10, ClientHeight(wndMain)-35, wndMain) ; Init Stuff SetBuffer(CanvasBuffer(canMain)) CreateTimer(60) ; Main Loop Repeat : MainLoop() : Forever Function MainLoop() Select WaitEvent() Case $803 : End Case $4001 : Render() End Select End Function Function Render() ;Cls if you want Color Rand(256), Rand(256), Rand(256) Rect(Rand(ClientWidth(canMain)), Rand(ClientHeight(canMain)), Rand(10), Rand(10), True) FlipCanvas(canMain) End Function You can even have multiple canvases if you want to! |
| ||
Yes, this is wath i need :-) Thank you very much Soja. BB3D & BB+ is not so bad after all ;-) |