WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Use atlas name in string? (https://www.wowinterface.com/forums/showthread.php?t=58492)

LudiusMaximus 12-28-20 04:40 PM

Use atlas name in string?
 
Looking at the global strings I have figured out that you can use textures in strings like this:

Code:

"|TInterface\\OptionsFrame\\UI-OptionsFrame-NewFeatureIcon:0:0:0:-1|t" .. "My label text"
This works for me, but how can I do this with Atlas names?
When I try to emulate global strings like this,

Code:

"{Atlas|NPE_RightClick:20}" .. "My label text"
I get:

Code:

{Atlas
PE_RightClick:20}My label text

I am using the string as the "name" attribute of an AceConfig-3.0 "execute" button.

Fizzlemizz 12-28-20 05:28 PM

Code:

local MyLabel = CreateAtlasMarkup("NPE_RightClick", 16, 16).."My label text"

LudiusMaximus 12-28-20 05:30 PM

Excellent!! Thanks a lot. :-)

SDPhantom 12-28-20 11:00 PM

In case you're still wondering, here's the atlas escape format.
Quote:

|Aatlas:height:width[:offsetX:offsetY]|a

LudiusMaximus 12-29-20 03:05 AM

Quote:

Originally Posted by SDPhantom (Post 338086)
In case you're still wondering, here's the atlas escape format.

Great to know! Thanks!


All times are GMT -6. The time now is 09:52 AM.

vBulletin © 2021, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI