I'm updating an addon to BCC and I managed to make it work with the
Backdrop System Changes by inheriting from `BackdropTemplate`. But now all my frame are transparent, they have no background.
I'm creating the frames like so:
Lua Code:
tempObject = CreateFrame("Frame", "LSButtonDialog", "Button Settings", "LunarWindow");
tempObject:SetBackdropColor(0, 1, 0, 1.0);
tempObject:SetFrameStrata("HIGH");
tempObject:EnableKeyboard(false);
tempObject:SetScript("OnKeyDown", Lunar.Settings.Keybind_OnKeyDown);
tempObject:SetScript("OnKeyUp", Lunar.Settings.Keybind_OnKeyUp);
The
`LunarWindow` template is defined as
Code:
<Frame name="LunarWindow" movable="true" toplevel="true" enableMouse="true" hidden="true" parent="UIParent" virtual="true" inherits="BackdropTemplate">
<Size>
<AbsDimension x="352" y="32"/>
</Size>
<Anchors>
<Anchor point="CENTER" />
</Anchors>
<Backdrop bgFile="Interface\AddOns\LunarSphere\art\Window-Background" edgeFile="Interface\Addons\LunarSphere\art\Window-Border" tile="true">
<BackgroundInsets>
<AbsInset left="5" right="5" top="5" bottom="5"/>
</BackgroundInsets>
<TileSize>
<AbsValue val="128"/>
</TileSize>
<EdgeSize>
<AbsValue val="16"/>
</EdgeSize>
</Backdrop>
The resulting frame is
https://imgur.com/pWBjlG3
But for the Classic client it works!
The
Classic `LunarWindow` template just differs by not inheriting from `BackdropTemplate`:
Code:
<Frame name="LunarWindow" movable="true" toplevel="true" enableMouse="true" hidden="true" parent="UIParent" virtual="true">
The frame does have a nice background.
https://imgur.com/yuiNdm8
What am I doing wrong here? Do I need to inherit from something different than `BackdropTemplate`?
Thanks!!