What happened to MaxGUI in SyncMods today?
BlitzMax Forums/BlitzMax Programming/What happened to MaxGUI in SyncMods today?
| ||
This is getting beyond funny. I've spent what feels like two entire days work tracking down mysterious bugs which have cropped up with Syncmods changes, and now today, my TrueVision preview window which was sitting nicely in a MaxGUI canvas has vanished. My code hasn't changed, and I noticed MaxGUI listed on the Syncmods ( I was only sync'ing in the hope that it would fix some of the other stuff it's broken in the past week ) and now I have no idea why. TV is reporting that everything is great, but there is no window. So if you could tell me what changed, maybe I have half a chance of figuring out how to fix it again. And is there somewhere in the docs where we can find this for ourselves, because I really hate cluttering up the forums to find out. |
| ||
Your going to shout at me for this. However, you have changed all the directory paths today, so are you sure it wanst that that did this? |
| ||
The most recent fixes were all due to current bug reports, maybe start with verifying I got the freecanvas crash fix correct. The other "fix" that may affect you is the new clipping win32maxgui is doing between siblings, will test now... |
| ||
However, you have changed all the directory paths today, so are you sure it wanst that that did this? Yes, I'm sure. Paths are in no way involved in using the TV engine. The most recent fixes were all due to current bug reports, maybe start with verifying I got the freecanvas crash fix correct. Ok, thanks, will take a look. |
| ||
Hmm, I was under the impression gadgets created last would be ontop but it seems with the new clipping it's the other way round (change order of CreateCanvas and CreateTabber to experiment):' createtabber.bmx Strict Local window:TGadget Local tabber:TGadget Local document:TGadget[3] Local currentdocument:TGadget Local canvas:TGadget ' CreateDocument creates a hidden panel that fills entire tabber client area Function CreateDocument:TGadget(tabber:TGadget) Local panel:TGadget panel=CreatePanel(0,0,ClientWidth(tabber),ClientHeight(tabber),tabber) SetGadgetLayout panel,1,1,1,1 HideGadget panel Return panel End Function ' create a default window with a tabber gadget that fills entire client area window=CreateWindow("My Window",30,20,400,300) canvas=CreateCanvas(50,50,320,240,window) tabber=CreateTabber(0,0,ClientWidth(window),ClientHeight(window)/2,window) SetGadgetLayout tabber,1,1,1,1 ' add three items and corresponding document panels to the tabber AddGadgetItem tabber,"Document 0",False,-1,"" AddGadgetItem tabber,"Document 1",False,-1,"Tabber Tip 1" AddGadgetItem tabber,"Document 2",False,-1,"tips 4 2" document[0]=CreateDocument(tabber) document[1]=CreateDocument(tabber) document[2]=CreateDocument(tabber) SetPanelColor document[0],255,200,200 SetPanelColor document[1],200,255,200 SetPanelColor document[2],200,200,255 ' our documents start off hidden so make first one current and show currentdocument=document[0] ShowGadget currentdocument CreateTimer 50 ' standard message loop with special tabber GADGET_ACTION handling While WaitEvent() Select EventID() Case EVENT_GADGETACTION If EventSource()=tabber HideGadget currentdocument currentdocument=document[EventData()] ShowGadget currentdocument EndIf Case EVENT_TIMERTICK RedrawGadget canvas Case EVENT_GADGETPAINT SetGraphics CanvasGraphics(canvas) SetOrigin 160,120 SetLineWidth 5 Cls Local t=MilliSecs() DrawLine 0,0,120*Cos(t),120*Sin(t) DrawLine 0,0,80*Cos(t/60),80*Sin(t/60) Flip Case EVENT_WINDOWCLOSE End End Select Wend |
| ||
Yep, that's what it was alright. Thanks for the very fast help with that. EDIT: And yes, the bug with free'ing canvases is fixed too. Thanks! |
| ||
Crap, that gadget order clipping thing is the opposite on Mac, fix 1 thing, break 2 others... |
| ||
FOUND A FIX!!!! Skid: Here is a fix I've just found for the Windows reverse bug order. Check back in original post. It should mean Mac/Linux/Windows all work the same way. After applying these fixes, the example you gave now draws with the correct Z-Order. The gadget drawn last, is the gadget on top. |