WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Where do I find information on Templates? (https://www.wowinterface.com/forums/showthread.php?t=59835)

Codger 03-23-24 02:22 PM

Where do I find information on Templates?
 
I'm trying to create a frame for a tab control:
I was looking at an old addon and found this code:
Lua Code:
  1. local tabButton = CreateFrame("Button", nil, frame, "TabButtonTemplate")
...but when I load the addon I get an error:
CreateFrame(): Couldn't find inherited node "TabButtonTemplate"
I discovered this documentation that shows the template is available?
https://www.wowinterface.com/forums/...ad.php?t=40444
I'm still learning addon development.
Any help is much appreciated.

Fizzlemizz 03-23-24 03:02 PM

You can export the entire Blizzard UI code from the game and look for the template there.

Addons can have their own templates so you need to make sure the code you're looking at isn't using one of those (unless you have the addon installed).

Also, frames/templates can change over time (like become an intrinsic or another template entirely or just plain removed) so you also need to make sure the code is current and for the correct game client (vanilla/retail/latest classic)

Xrystal 03-23-24 06:19 PM

As an alternative to downloading yourself there are 2 sites I have on my shortcut list that I utilise if I haven't downloaded a recent version of the files.

https://github.com/Gethe/wow-ui-source - has all versions of wow

https://www.townlong-yak.com/framexml/live - not sure if they have classic versions


All times are GMT -6. The time now is 01:49 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI