Thanks for the reply!
I've tried your suggestion and now I'm getting an `attempt to call method 'SetBackdropColor' (a nil value)` error when trying to create the frame. Where should the `OnLoadFunc` function be placed? Does it need to be somewhere special?
But regardless of that, my understanding is that by using an `OnLoad` method you can avoid having separate XML files for Classic and Retail/BCC, which is nice. Will this solve the problem of transparent backgrounds?
The frame already had a <Script> section:
Code:
<Scripts>
<OnLoad>
self:SetBackdropColor(1.0,1.0,1.0,1);
</OnLoad>
<OnMouseDown>
if ( button == "LeftButton" ) then
self:StartMoving();
end
</OnMouseDown>
<OnMouseUp>
self:StopMovingOrSizing();
</OnMouseUp>
</Scripts>
So I've changed it to:
Code:
<Scripts>
<OnLoad inherit="prepend">
if BackdropTemplateMixin then -- if this is NOT a Classic type frame, add the backdrop mixin
Mixin(self, BackdropTemplateMixin)
end
self:SetBackdropColor(1.0,1.0,1.0,1);
</OnLoad>
<OnMouseDown>
if ( button == "LeftButton" ) then
self:StartMoving();
end
</OnMouseDown>
<OnMouseUp>
self:StopMovingOrSizing();
</OnMouseUp>
</Scripts>
That fixed the `attempt to call method 'SetBackdropColor' (a nil value)` error, but I'm still getting a transparent background.
Thanks!