[Approved] fadelabel dimColor in a group (1 Viewer)

ajp8164

Portal Pro
January 9, 2008
575
1,166
Atlanta, GA
Home Country
United States of America United States of America
I found that if a fadelabel is in a group in which no control would ever have focus (e.g., a group of labels and fadelabels) that setting the dimColor on the group did not affect the default rendered dim color for the fade label. The fade label is always rendered using the default dimColor defined in the base control (GUIControl).

The reason that the fade label did not inherit the groups dimColor is that the implementation of the fade label delegates all of it's rendering to an aggregated label control. This label control is not known by the default DimColor getter/setter defined in the base control (GUIControl). The fix is to simply override the DimColor getter/setter in the fade label to pass the DimColor onto the label control delegate.

Attached is a text file the includes the new DimColor getter/setter for GUIFadeLabel.cs. Simply add this to the bottom of GUIFadeLabel.cs.
 

Attachments

  • fade_label_dim.patch
    30.6 KB

Users who are viewing this thread

Top Bottom