Gradients in LUA
Hey guys, just wondering how to create gradients using LUA.
For example, I have a panel created using CreateFrame(), how can I make this panel fade from one side to another? |
Quote:
SetGradientAlpha() so in a nutshell, you just have to create a texture for your frame and then apply SetGradientAlpha method to it. e.g. local f = CreateFrame"Frame" f.t = f:CreateTexture(nil, "PARENT") f.t = SetTexture(some_texture or 1,1,1,1) f.t:SetAllPoints(f) f.t:SetGradientAlpha("HORIZONTAL", 0,0,0,1, 0,0,0,0) f:SetWidth(some_width_value) f:SetHeight(some_height_value) |
I use this
Code:
local frame = CreateFrame("Button") |
All times are GMT -6. The time now is 04:48 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI