Transparent images on a Window
BlitzMax Forums/MaxGUI Module/Transparent images on a Window
| ||
Is there a way to: SetPanelPixmap and not see black/white where transparency should be -or- Find the system color for the windows/panels/buttons/etc. (On Windows it is usually a shade of grey) I would like to to be able to create non-square transparent buttons/icons and stick them to panels |
| ||
I'm sure I've posted a bug report in the past regarding this, but it has probably got lost when everything went into the bug bin a while back. |
| ||
There is a file called "seeThru" from Chris Camacho that you might be interested in. Thread is here http://www.blitzbasic.com/Community/posts.php?topic=62753#700994 The website seems to have disappeared, so I have uploaded the file to my site at http://home.bellsouth.net/p/PWP-BlitzStuff Edit:Files are on different server now. |
| ||
I have seen the seethru file before but i choose to use a code supplied by Yan. I dont want to make the window transparent, I just want create a non-square panel or at least what looks like a non-square panel. Is that a little more clearly explained? |
| ||
Seethru will do that. Just pass the panel as a parameter instead of a window.![]() Framework BRL.Pixmap Import BRL.PNGLoader Import BRL.Win32MaxGUI Import "see-thru.bmx" Local mask:TPixmap=LoadPixmap("image1.png") Local Button1:TPixmap = LoadPixmap("button1.png") Local Button2:TPixmap = LoadPixmap("Button2.png") Local window:Tgadget=CreateWindow("a hole",0,0,640,480) Local Panel:TGadget=CreatePanel(100,100,128,128,Window,PANEL_ACTIVE) SetPanelColor(Panel,255,255,255) SetPanelPixmap(Panel,Button1) MakeSeeThru(Panel,mask) ActivateGadget Panel While WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_MOUSEDOWN SetPanelPixmap(Panel,Button2) Case EVENT_MOUSEUP SetPanelPixmap(Panel,Button1) EndSelect Wend media ![]() ![]() ![]() |
| ||
Oh, I didn't think of it like that. I tried it with Yan's code at http://blitzbasic.com/Community/posts.php?topic=62753. And it works beautifully even with mouse enter/leave events or other gadgets contained in it. Thanks for the help. |