miniB3D floating windows and event
BlitzMax Forums/MaxGUI Module/miniB3D floating windows and event
| ||
| hello all i'm working on an application that have a main 3D window that use minib3d, but im too lazy to draw an interface with graphics, so i wish to use maxgui ^_^ To be honest, i've a massive data to show and to edit and it look better to use gui, so that's it. :P Now my problem is about the main window, 'cause the user can use the arrow keys to move the camera around the 3D space, but he could also click on a window that have a combobox with a list of entities when the user click on an combobox's item the camera will be moved, so i suppose that I've to raise an event but how to, I've no idea :-\ i should check that window without giving it a focus, 'cause the user sill playing on the main window so something like this is out of discussion While Not KeyDown(KEY_ESCAPE) '... main game code RenderWorld '... more code.. '"=== GUI EVENT ??!! ActivateGadget wndPlanet Select EventID() Case EVENT_GADGETACTION s=GadgetItemText(ComboBox,SelectedGadgetItem(ComboBox)) SetStatusText MyWindow , "index=" + SelectedGadgetItem(ComboBox) + ":item=" + s MoveEntity cam,EntityX(plnt[SelectedGadgetItem(ComboBox)]),EntityY(plnt[SelectedGadgetItem(ComboBox)]),EntityZ(plnt[SelectedGadgetItem(ComboBox)]) End Select Flip 'Cls Wend End help i'm lost :( |
| ||
Its not possible to use MaxGui in graphics-mode. You must use a Canvas:
Strict
Local window:TGadget=CreateWindow("My Canvas",0,0,320,320)
Local canvas:TGadget=CreateCanvas(0,0,320,240,window)
CreateTimer 60
While WaitEvent()
Select EventID()
Case EVENT_TIMERTICK
RedrawGadget canvas
Case EVENT_GADGETPAINT
SetGraphics CanvasGraphics(canvas)
Cls
Flip
Case EVENT_APPTERMINATE
End
End Select
WendI dont know if if the miniB3d version you use has canvas support... |
| ||
| i've discovered the answare just now and it's yes ;) http://www.blitzbasic.com/Community/posts.php?topic=72094#805785 thnx for reply btw ^^ |