Hi all,
Just a quick question regarding backdrop.
Before I start, let's have a look at the example code first.
Lua Code:
local myPortrait = CreateFrame("PlayerModel", nil, UIParent);
myPortrait:SetSize(50, 50);
myPortrait:SetPoint("CENTER");
...(rest of codes to set the appearance of myPortrait)
local myTemplate = CreateFrame("Frame", nil, myPortrait);
myTemplate:SetFrameLevel(myPortrait:GetFrameLevel);
myTemplate:SetPoint("TOPLEFT", -1, 1);
myTemplate:SetPoint("BOTTOMRIGHT", 1, -1);
myTemplate:SetBackdrop({
bgFile = myBG,
edgeFile = myEdge,
});
myTemplate:SetBackdropColor(0.2, 0.2, 0.2);
myTemplate:SetBackdropBorderColor(0, 0, 0);
myPortrait.template = myTemplate;
This will create a 50 by 50 3D portrait at the center of the screen and will also create another frame at the same frame level as portrait with the size of 52 by 52.
The problem is that since the template frame is at the same level as portrait, its backdrop will cover up the portrait (portrait is hidden at the back of template frame's backdrop).
My question here is would it be possible to send only backdrop's background to the back, but maintain border at its position and level?
So, basically the order from top to the bottom would be:
1. template frame's backdrop border
2. portrait frame
3. template frame's backdrop background
I could create a backdrop directly on portrait frame itself which would be the fastest option, and I am aware of that creating an extra frame only for backdrop is waste of resources, but still willing to know whether my concern above is possible or not
Thank you!
EDIT: :SetFrameStrata() doesn't seem to be working as I expected