Quantcast
WoWInterface - View Single Post - All my frames are transparent in Retail/BCC
View Single Post
05-24-21, 04:26 PM   #1
fullmoon_sulfuras
A Deviate Faerie Dragon
Join Date: Dec 2019
Posts: 10
All my frames are transparent in Retail/BCC

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:
  1. tempObject = CreateFrame("Frame", "LSButtonDialog", "Button Settings", "LunarWindow");
  2. tempObject:SetBackdropColor(0, 1, 0, 1.0);
  3. tempObject:SetFrameStrata("HIGH");
  4. tempObject:EnableKeyboard(false);
  5. tempObject:SetScript("OnKeyDown", Lunar.Settings.Keybind_OnKeyDown);
  6. 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!!
  Reply With Quote