Icon and Texture tinting in Addons
I've seen a few addons which obviously tint some of their used icons.
How does this work "zo_iconFormat(...)"? |
zo_iconFormatInheritColor is your friend. Just use the |c format in front of it.
|
Great, now it works. Here is an example for other people:
Code:
Label:SetText(string.format("|cFF0000%s|r", zo_iconFormatInheritColor(texturePath, textureSize, textureSize))) Additional information: Text_Formatting_Examples Thank you. |
In addition you can use ZO_ColorDef in order to simplify the handling of everything related to colors. Your example would then look like this:
Lua Code:
p.s. in Lua you'd typically use lower_case or camelCase names for regular variables and ALL_CAPS for constants. Only classes or (at least in ESO) functions should use an uppercase letter. |
All times are GMT -6. The time now is 11:39 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI