Cannot make a button transparent
by Frank Bignone · in Torque Game Engine · 11/02/2001 (1:43 pm) · 6 replies
I'm using the attribute opaque to set some button transparent :
But the buttons are not opaque, and are filled in gray event if I set the fill color to something else.
Any hints ?
PS: with the last engine (V12), this piece of code works
new GuiControlProfile (GuiHollowButtonProfile)
{
opaque = false;
fillColor = "192 0 0";
border = false;
borderColor = "0 0 0";
borderColorHL = "127 0 0";
fontColor = "0 0 0";
fontColorHL = "32 100 100";
fixedExtent = true;
justify = "center";
canKeyFocus = false;
soundButtonOver = "AudioButtonOver";
fontSize = 24;
};But the buttons are not opaque, and are filled in gray event if I set the fill color to something else.
Any hints ?
PS: with the last engine (V12), this piece of code works
About the author
Real programmers don't waste time recompiling; they patch the binary files... ... Real programmers don't waste time patching binary files; they patch memory.
#2
11/02/2001 (3:00 pm)
In fact, I tried to get my old code working; but it seems some parts are not working now. I really like to have the opaque flag working well, as I'm using it quite exttensively.
#3
Nevermind, I stopped being lazy and looked at the code.
Try changing the area around line 35 of guiButtonCtrl::onRender to this:
11/02/2001 (3:45 pm)
What does it do, anyway?Nevermind, I stopped being lazy and looked at the code.
Try changing the area around line 35 of guiButtonCtrl::onRender to this:
if (mProfile->mOpaque)
{
if (mDepressed)
renderLoweredBox(boundsRect);
else
renderRaisedBox(boundsRect);
}
#4
It's quite late here, so I need to go to bed now. I will look at it tomorrow morning.
If the opaque flag works correctly, I should only see the text of the button, nothing else.
see ya
11/02/2001 (3:54 pm)
In fact it just fills the button in gray and do not take into account the opaque flag (and even the fill color).It's quite late here, so I need to go to bed now. I will look at it tomorrow morning.
If the opaque flag works correctly, I should only see the text of the button, nothing else.
see ya
#5
Why the hell was this feature removed from first release ?
I compare the last code and the new one, and it's very different.
11/03/2001 (3:06 am)
Nice it solves my problem.Why the hell was this feature removed from first release ?
I compare the last code and the new one, and it's very different.
#6
11/03/2001 (5:28 am)
does this have anything to do with getting rid of the box around the chatmessage text? i really dont like that box. how would you get rid of it?
Associate James Lupiani
Sickhead Games