WoW:API FontString SetAlphaGradient: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Move page script moved page API FontString SetAlphaGradient to API FontString SetAlphaGradient without leaving a redirect) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{widgetmethod}} | |||
Creates or removes an alpha gradient over the text in the FontString fading from 100% opaque to 100% transparent. | Creates or removes an alpha gradient over the text in the FontString fading from 100% opaque to 100% transparent. | ||
Line 27: | Line 29: | ||
Now, view any tooltip. You will see the text on the first line of the tooltip fade out as it approaches 40 pixels from the left. To set the tooltip back use: | Now, view any tooltip. You will see the text on the first line of the tooltip fade out as it approaches 40 pixels from the left. To set the tooltip back use: | ||
GameTooltipTextLeft1:SetAlphaGradient(0,0) | GameTooltipTextLeft1:SetAlphaGradient(0,0) | ||
Latest revision as of 04:45, 15 August 2023
← Widget API ← FontString < SetAlphaGradient
Creates or removes an alpha gradient over the text in the FontString fading from 100% opaque to 100% transparent.
success = FontString:SetAlphaGradient(start,length)
- Arguments
- start
- Distance from the left in pixels that the gradient will start
- length
- Length in pixels of the gradient.
- If the length is 0, the text is returned to normal.
- Returns
- success
- 1 if the gradient change was made
- nil if no action was taken
- Example
To see it's effects try this:
GameTooltipTextLeft1:SetAlphaGradient(0,40)
Now, view any tooltip. You will see the text on the first line of the tooltip fade out as it approaches 40 pixels from the left. To set the tooltip back use:
GameTooltipTextLeft1:SetAlphaGradient(0,0)