C4 Engine
C4 Engine API Documentation

Widget::SetWidgetAlpha

Defined in:  C4Widgets.h
Sets the alpha channel of a widget color.
Prototype

virtual void SetWidgetAlpha(float alpha, WidgetColorType type = kWidgetColorDefault) override;

Parameters
alpha The new alpha value for a widget color.
type The type of the color that is affected. See below for possible values.
Description
The SetWidgetAlpha function sets the alpha channel of the widget color corresponding to the type specified by the type parameter. The type can be one of the following constants.
kWidgetColorDefault The default color for the widget. This is usually equivalent to one of the other types of colors, but which one varies with the type of the widget. See the documentation for the individual Widget subclasses for information about the default color.
kWidgetColorText The color of any text shown by the widget.
kWidgetColorLine The color of any lines or strokes shown by the widget.
kWidgetColorFill The color of any solid fills shown by the widget.
kWidgetColorBorder The color of the widget's border.
kWidgetColorBackground The color of the widget's background.
kWidgetColorButton The color of any buttons belonging to the widget.
kWidgetColorHilite The color used to highlight parts of the widget.
kWidgetColorCaret The color of the insertion caret.
kWidgetColorClear The clear color for viewport widgets.
kWidgetColorGlyphEffect The color of glyph effects applied to text.
The red, green, and blue channels of the target color are not affected. If the widget does not support the color specified by the type parameter, then no change is made to any of the widget's colors.
See Also

Widget::GetWidgetColor

Widget::SetWidgetColor

ColorRGBA