Widget API: UIObject:SetAlpha
Jump to navigation
Jump to search
← 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.
Example
MyFrame:SetAlpha(.75);
Makes the frame translucent, more visible than not.
Notes
Transparency is applied to child objects the same as scaling. If a parent is set to e.g 0.5, and a child is set to 1, the child will still be shown as 0.5. If a parent and child both are set to 0.5, the result will be 0.5 * 0.5 = 0.25 for the child.
If you attempt to set the same value more than once it will detect this and return early after the first attempt.