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"> Thanks for helping! |
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.
|
Quote:
|
BACKDROP_TOOLTIP_16_16_5555 doesn't exist (anymore?)
|
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:
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. |
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. |
Oh thanks .. worth noting for the future. I totally forgot about the NineSlice stuff when I was looking.
|
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. |
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. |
All times are GMT -6. The time now is 07:01 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI