|
[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
OP
User
|
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:
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.
|
|
|
[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
OP
User
|
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):
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!
Last edited by Aku_Aku; 10/02/16 10:37.
|
|
|
|