Lua Code:
<Frame name="TestFrame" parent="UIParent">
<Size x="300" y="300"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Scripts>
<OnLoad inherit="prepend">
if BackdropTemplateMixin then
Mixin(self, BackdropTemplateMixin)
end
self:SetBackdrop( BACKDROP_TOOLTIP_16_16_5555 )
self:SetBackdropColor(unpack(LEGENDARY_ORANGE_COLOR))
self:SetBackdropColor(0.25)
</OnLoad>
</Scripts>
</Frame>
Because the frame doesn't have the backdrop code when it is created, the xml attributes for backdrops are ignored (or error?) so they have to be set after the frame is configured to use a backdrop via the mixin.
This should work in all versions of the client.
You could replace:
Code:
self:SetBackdrop( BACKDROP_TOOLTIP_16_16_5555 )
with:
Code:
self:SetBackdrop(
{
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true,
tileEdge = true,
tileSize = 16,
edgeSize = 16,
insets = { left = 5, right = 5, top = 5, bottom = 5 },
}
)