Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (dr_panther, Ayumi, 7th_zorro), 877 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[SOLVED] Totally transparent panel with visible buttons #462462
10/02/16 10:00
10/02/16 10:00
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
I tried to create a totally transparent panel with visible buttons. With no real success. This way:
Code:
mPanel = pan_create(NULL, 1);
mPanel.bmap = bmap_createblack(128, 128, 16);
tbmp1 = bmap_create("button.png");
pan_setbutton(mPanel,0,1,2,2,tbmp1,tbmp1,tbmp1,tbmp1,button_says,NULL,NULL);
set(mPanel,TRANSLUCENT);
set(mPanel,SHOW);


I have a panel with a button. Unfortunately it is not totally transparent panel.
If it covers an other panel, that becomes little bit greyer, a bit shadowed.
I played with mPanel.alpha but as i set to lower and more lower value, the button becomes also more and more transparent.
Please give some advise or show me the way, how could i achieve what i wrote in the subject of the post ?

Last edited by Aku_Aku; 10/02/16 10:36.
Re: Totally transparent panel with visible buttons [Re: Aku_Aku] #462463
10/02/16 10:10
10/02/16 10:10
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
For this I personally just use no bmap for the panel and buttons with transparent images/bmaps. I also dont set the TRANSLUCENT flag (unless you want to play with the alpha of the buttons during gameplay).

[SOLVED] Totally transparent panel with visible buttons [Re: Reconnoiter] #462464
10/02/16 10:35
10/02/16 10:35
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
I think i am lucky this day, because i have found something that is working that way that i want.
I have changed the code this way (see the comments):
Code:
mPanel = pan_create(NULL, 1);
mPanel.bmap = bmap_createblack(128, 128, 32); // changed from 16 to 32
bmap_fill(mPanel.bmap,vector(0,0,0),0); // added now
tbmp1 = bmap_create("button.png");
pan_setbutton(mPanel,0,1,2,2,tbmp1,tbmp1,tbmp1,tbmp1,button_says,NULL,NULL);
set(mPanel,TRANSLUCENT);
set(mPanel,OVERLAY); // added now
set(mPanel,SHOW);


Miracle! It works! smile

Last edited by Aku_Aku; 10/02/16 10:37.
Re: [SOLVED] Totally transparent panel with visible buttons [Re: Aku_Aku] #462465
10/02/16 11:02
10/02/16 11:02
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Good ol' overlay laugh , just keep buttons pixels/color above 0,0,0 I think


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1