m
Move page script moved page API UIObject SetAlpha to WoW:API UIObject SetAlpha without leaving a redirect
No edit summary |
m (Move page script moved page API UIObject SetAlpha to WoW:API UIObject SetAlpha without leaving a redirect) |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{widgetmethod}} | {{widgetmethod}} | ||
Sets the alpha (transparency) of the given object. | Sets the alpha (transparency) of the given object. | ||
MyObject:SetAlpha(alpha) | MyObject:SetAlpha(alpha) | ||
== Arguments == | == Parameters == | ||
=== Arguments === | |||
* alpha (number) - a floating-point number between 0 and 1: 1 is fully opaque, 0 is transparent (in fact, invisible). | |||
== Example == | == Example == | ||
Makes frame <tt>MyFrame</tt> translucent, more visible than not: | Makes frame <tt>MyFrame</tt> translucent, more visible than not: | ||
MyFrame:SetAlpha(.75); | MyFrame:SetAlpha(.75); | ||
Fade the whole UI so that it becomes barely visible: | Fade the whole UI so that it becomes barely visible: | ||
UIParent: | UIParent:SetAlpha(0.1); | ||
== Notes == | == Notes == | ||
* As of [[2.1.0_consolidated_changes#Frames|patch 2.1.0]], transparency propagates down through all child objects. | |||
As of [[2.1.0_consolidated_changes#Frames|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."'' | : ''"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 == | == See also == | ||
* [[API Frame GetEffectiveAlphs|Frame:GetEffectiveAlpha()]] | * [[API Frame GetEffectiveAlphs|Frame:GetEffectiveAlpha()]] | ||
* [[API UIObject GetAlpha|UIObject:GetAlpha()]] | * [[API UIObject GetAlpha|UIObject:GetAlpha()]] | ||