WidgetGetOpacity

Syntax

Opacity.f = WidgetGetOpacity(Widget)

Description

Retrieves the current opacity level applied to the entire widget.

Parameters

Widget
The handle of the ProGUI widget whose opacity is to be retrieved.

Return Value

Returns the opacity level as a floating-point number (Float) between 0.0 (fully transparent) and 1.0 (fully opaque). Returns 0.0 or #False if the widget handle is invalid.

Remarks

This opacity value affects the entire widget, including its background, border, and any content drawn within its #PG_Event_Draw handler. It is multiplied with any opacity values set within drawing commands (e.g., DrawBox()) or brushes. The default opacity is 1.0.

See Also

WidgetSetOpacity, BeginLayer (for layer-specific opacity)

Supported OS

Windows, Linux