About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
Opacity of individual GUI elements
Author Message
MrPi Offline
Member

Post: #1
Opacity of individual GUI elements
Is it possible to set the opacity / alpha of individual text elements without having to change the alpha value in the TextStyle color? If I do that, I would change it for all text elements that use that TextStyle.

It would be really neat to implement a feature in GuiObj to change the alpha.
Another fix for Text elements would be not to store a pointer of the TextStyle, but an actual instance, so that we can change it individually.
(This post was last modified: 08-11-2013 12:30 PM by MrPi.)
08-11-2013 12:30 PM
Find all posts by this user Quote this message in a reply
SamNainocard Offline
Member

Post: #2
RE: Opacity of individual GUI elements
What about create another TextStyle just for that GuiObj? That's what I'm using by the way.
08-12-2013 08:03 AM
Find all posts by this user Quote this message in a reply
MrPi Offline
Member

Post: #3
RE: Opacity of individual GUI elements
If I want to change the alpha regularly (imagine for example a flashing text), I'll end up with a textstyle for each single element. And those must be in static memory. wink
Thanks anyway, I'll just make a feature request if there is no better way.
08-12-2013 12:43 PM
Find all posts by this user Quote this message in a reply
shadow Offline
Member

Post: #4
RE: Opacity of individual GUI elements
you can do
class Text2 : Text
{
TextStyle ts_value;
Text2() {ts=&ts_value;}
}
or
use Text.code and set [color] for the text
08-16-2013 03:32 AM
Find all posts by this user Quote this message in a reply
Post Reply