Thread Tools Display Modes
06-20-22, 01:41 PM   #1
Kesselero
A Murloc Raider
Join Date: Jun 2022
Posts: 6
Backdrop (in XML) doesn't show even after adjusting to 9.0 patch

Hey,

so im trying to get a backdrop of a frame to show up, I'm not getting any errors and the frame seems to load fine but without any textures applied to it.

I just copy pasted the example from https://github.com/Stanzilla/WoWUIBu...system-changes just to test but nothing happens.

Code:
<Frame name="TestFrame" parent="UIParent" inherits="BackdropTemplate">
    <KeyValues>
        <KeyValue key="backdropInfo" value="BACKDROP_TOOLTIP_16_16_5555" type="global"/>
        <KeyValue key="backdropBorderColor" value="LEGENDARY_ORANGE_COLOR" type="global"/>
        <KeyValue key="backdropBorderColorAlpha" value="0.25" type="number"/>
    </KeyValues>
    <Size x="300" y="300"/>
    <Anchors>
        <Anchor point="CENTER"/>
    </Anchors>
    <Scripts>
        <OnLoad inherit="prepend">
            print("Loaded!");
        </OnLoad>
    </Scripts>
</Frame>
Using /fstack I can click the frame in the center of my screen but no texture is showing

Thanks for helping!

Last edited by Kesselero : 06-20-22 at 01:46 PM.
  Reply With Quote
06-20-22, 02:22 PM   #2
Mimma
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Nov 2019
Posts: 7
The code works for me if I change the backdropInfo to another one than BACKDROP_TOOLTIP_16_16_5555 - for example BACKDROP_ARENA_32_32.

Last edited by Mimma : 06-20-22 at 02:27 PM.
  Reply With Quote
06-20-22, 04:25 PM   #3
Kesselero
A Murloc Raider
Join Date: Jun 2022
Posts: 6
Originally Posted by Mimma View Post
The code works for me if I change the backdropInfo to another one than BACKDROP_TOOLTIP_16_16_5555 - for example BACKDROP_ARENA_32_32.
Weird, but it does work! Thank you
  Reply With Quote
06-20-22, 08:37 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
BACKDROP_TOOLTIP_16_16_5555 doesn't exist (anymore?)
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
06-20-22, 08:52 PM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Doesn't seem to be in Backdrop.lua - 9.1.5 version here - https://github.com/Gethe/wow-ui-sour...L/Backdrop.lua

Nor in the GameTooltip.lua file from 9.2.5 - https://github.com/Gethe/wow-ui-sour...ameTooltip.lua


Looks like I will have to find another frame for my backdrops as I think I was using that for all my addons. And there I was hoping I wouldn't have to do anything until I got access to Dragonflight, seeing as there could be some hefty UI changes there based on the talk they streamed.


Yep, my Mage Portal addon needed adjusting - obviously no-one using it as have had no reports of problems in months. Anyway. I put this block of code in one of my lua files that loaded before the file needing access to it.

Lua Code:
  1. XRYSTAL_BACKDROP_TOOLTIP_16_16_5555 = {
  2.     bgFile = "Interface\Tooltips\UI-Tooltip-Background",
  3.     edgeFile = "Interface\Tooltips\UI-Tooltip-Border",
  4.     tile = true,
  5.     tileEdge = true,
  6.     tileSize = 16,
  7.     edgeSize = 16,
  8.     insets = { left = 5, right = 5, top = 5, bottom = 5 },
  9. };

This is the closest to what the addon original had before switching to the built in layout. Obviously being a public table in my case I had to give it a unique name. You could perhaps use a localised variable instead.
__________________

Last edited by Xrystal : 06-20-22 at 09:23 PM.
  Reply With Quote
06-22-22, 04:23 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
I noticed a lot of backdrop constants moved over to SharedXML\NineSliceLayouts.lua a while ago. Gethe has commits on it going back to 9.1.5.

These are applied using NineSliceUtil.ApplyLayout(). BackdropTemplate is basically a NineSlice frame, so you can pass it directly to NineSliceUtil.



If you insist on using XML, here are a few templates that might interest you.Ultimately, it's NineSlicePanelTemplate/NineSliceCodeTemplate that handles applying the layout. You can inherit NineSlicePanelTemplate directly and set the layoutType key there if you aren't going to use the backdropColor or backdropColorAlpha keys.



If you're interested in how BackdropTemplate converts the old backdrop tables into NineSlice layouts, BackdropTemplateMixin:ApplyBackdrop() handles that passing BackdropTemplateMixin:SetupPieceVisuals() as the optional setup function.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 06-22-22 at 05:00 PM.
  Reply With Quote
06-22-22, 05:37 PM   #7
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Oh thanks .. worth noting for the future. I totally forgot about the NineSlice stuff when I was looking.
__________________
  Reply With Quote
06-22-22, 05:48 PM   #8
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
I haven't watched any of the streams. I just don't have the time or attention span really for that format of media. Even so, the way BackdropTemplate was coded, it seems like it's a bridge between the old backdrop layouts and the NineSlice system. I would venture a guess that they're in the middle of converting everything to NineSlice and the old Backdrop is going away permanently.

With how much older code used the Backdrop system, it would take substantial effort to convert all of it at once and it was easier to move the new implementation forward this way to buy more time.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
06-22-22, 07:08 PM   #9
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Well they have said the UI has had a big revamp for Dragonflight. Maybe this is one of those things that are enroute to that.

I'm already under the understanding that I may not need some of my addons or they may need rewrites etc. So hopefully I'll get into testing to see how things look. Otherwise, people will have to wait until I've had time to test and fix/rewrite things

I recall NineSlice as something sneaking into dominance in the last expansion so maybe this one is pushing them forward again as you say to be the next system to use.
__________________
  Reply With Quote

WoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » Backdrop (in XML) doesn't show even after adjusting to 9.0 patch

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off