View Single Post
06-22-22, 04:23 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
I noticed a lot of backdrop constants moved over to SharedXML\NineSliceLayouts.lua a while ago. Gethe has commits on it going back to 9.1.5.

These are applied using NineSliceUtil.ApplyLayout(). BackdropTemplate is basically a NineSlice frame, so you can pass it directly to NineSliceUtil.



If you insist on using XML, here are a few templates that might interest you.Ultimately, it's NineSlicePanelTemplate/NineSliceCodeTemplate that handles applying the layout. You can inherit NineSlicePanelTemplate directly and set the layoutType key there if you aren't going to use the backdropColor or backdropColorAlpha keys.



If you're interested in how BackdropTemplate converts the old backdrop tables into NineSlice layouts, BackdropTemplateMixin:ApplyBackdrop() handles that passing BackdropTemplateMixin:SetupPieceVisuals() as the optional setup function.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 06-22-22 at 05:00 PM.
  Reply With Quote