I am using a sprite to draw my menu:
USESCREEN -1
DRAWBACKGROUND()
USESCREEN 1
DRAWMENU()
USESCREEN -1
DRAWSPRITE 1,0,0
SHOWSCREEN
My problem is that I can not clear the sprite/menu and make it transparent. I want the zones in the menu_sprite not drawn to be transparent, so the background is shown under my menu_sprite.
I think you have to clear your screen to the colour you use as transparent. By default its usually that bright purple (255,0,128).
Look for the code on the help section.
I Did have same problem, but easy to do.
Just draw a rect using the transparency color. Then it's will clear with transparency.
Since the menu appears static, you could always include the background with the menu sprite, and only draw one sprite each frame.
Unless the background isn't static!
USESCREEN 1
DRAWBACKGROUND()
DRAWMENU()
USESCREEN -1
WHILE TRUE
DRAWSPRITE 1,0,0
SHOWSCREEN
WEND
The background is moving, but I just realize that I can draw the moving background on the menu sprite...
Anyway, I will try clearing the menu with 255,0,128... just for trying.
I tried before
clearscreen 0xff000000, 0xffffffff, 0x00000000, 0x00ffffff with some interesting results.
dont use CLEARSCREEN command, its wont work very well, But instead you use DRAWRECT.
USESCREEN 2
SETTRANSPARENCY RGB(0,0,0)
DRAWRECT 0,0,999,999,RGB(0,0,0) // will draw black colour _AND_ transparent alpha
found from (I posted extractly or near the same as you):
http://www.glbasic.com/forum/index.php?topic=6233.0
Do the job.