WoW:API UIObject SetAlpha: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
Line 15: Line 15:


Fade the whole UI so that it becomes barely visible:
Fade the whole UI so that it becomes barely visible:
  UIParent:SetAlpa(0.1);
  UIParent:SetAlpha(0.1);


== Notes ==
== Notes ==

Revision as of 11:46, 18 September 2008

Widget API ← UIObject < SetAlpha

Sets the alpha (transparency) of the given object.

MyObject:SetAlpha(alpha)

Arguments

alpha
Number - a floating-point number between 0 and 1: 1 is fully opaque, 0 is transparent (in fact, invisible).

Example

Makes frame MyFrame translucent, more visible than not:

MyFrame:SetAlpha(.75); 

Fade the whole UI so that it becomes barely visible:

UIParent:SetAlpha(0.1);

Notes

As of patch 2.1.0, transparency propagates down through all child objects.

"Frame alpha now propagates in the same way as scale (though is clamped between 0 and 1 on each object). This means you can cleanly fade the whole UI or specific frame assemblies."

See also