Posted by i2ichardt on Mon, 17 Jan 2011 01:07:41
There seems to be some oddities in how the background and border textures work, and i'm not sure exactly why there acting funny.
For example if i put the following in my .xml file the code will appear to not work until. It will show an empty/invisible frame until I save the changes and restart world of warcraft. It will then appear as i would expect it too.
<Frame name="Test3" parent="UIParent" hidden="false"> <Size> <AbsDimension x="30" y="30" /> </Size> <Anchors> <Anchor point="CENTER"> <Offset x="80" y="0" /> </Anchor> </Anchors> <Backdrop edgeFile="Interface\AddOns\MobAdvisor\images\GreenColor.tga" tile="true"> <EdgeSize> <AbsValue val="4" /> </EdgeSize> </Backdrop> </Frame>
But I just did that to test to make sure that the texture was working and looked like i wanted it to. So then when i try to actually implement the texture through the .lua on the fly via:
The frame becomes invisible/empty as if the texture isn't working correctly. I'm rather perplexed as to why this isn't working correctly.
Posted by jnwhiteh on Mon, 17 Jan 2011 09:35:47
Backdrops are deprecated in favour of the new tiling mechanisms. I don't quite understand your question, but you can look at some examples frames and the mechanisms they use to build them by searching for 'frame border pieces' in the following file: http://wowprogramming.com/utils/xmlbrowser/live/FrameXML/UIPanelTemplates.xml
Posted by i2ichardt on Mon, 17 Jan 2011 19:59:06
The problem is wow seems like it wont load the .tga file properly unless it was already stated in the .xml for the frame before wow was last started.
Posted by jnwhiteh on Mon, 17 Jan 2011 20:02:24
It will, but the file must have EXISTED prior to WoW being opened. It may be some quirk in the backdrop system (which is deprecated), but you can definitely load any texture arbitrarily by specifying the path, so long as that file existed in the interface directories when WoW was opened for that session.
Posted by i2ichardt on Tue, 18 Jan 2011 09:01:57
I glanced over it, dont see why it is considered and improvement. Seems more convoluted. I take a better look at it this weekend.
Posted by jnwhiteh on Tue, 18 Jan 2011 09:27:53
Its more powerful, and frankly the backdrop system as it stands is very confusing. You're welcome to continue using the backdrop system, it will be some time before its removed from the game.. and you should NOT be having missing texture issues. So please feel free to provide some more detailed information about what is happening. I just wanted to point you towards an alternative.
Posted by mithiwithi on Wed, 16 Feb 2011 18:21:05
The "new system" appears to be a matter of taking assorted textures and anchoring them around the edges of your frame, and although that's immensely more powerful, I don't see how it's any less confusing than the backdrop system.
Ignoring deprecation issues, I'd personally make the choice as follows:
- Do you want a simple border with a fixed width that's a power of 2? Use the backdrop system.
- Do you want to do anything beyond that (internal dividers, different widths on different edges)? Use the new system.
Is there a link confirming that the backdrop system is deprecated (preferably to a blue post but any vaguely authoritative source will do)?
Posted by jnwhiteh on Wed, 16 Feb 2011 22:16:54
I'm saying it, and all of the new Blizzard code has moved over to the new system. Take that for what it's worth. Deprecated does not mean the feature is going to be removed imminently, but the feature is very likely to be removed.
Posted by tom022 on Wed, 12 Jun 2013 03:50:22
Yes i know, my post after 2 years. But i had the same problem. I find this post but not the solution so i was still looking. I find it here http://www.wowwiki.com/APITextureSetTexture
Images may be in BLP or TGA format, and must have power-of-two dimensions up to 1024 pixels. TGA images may have 8, 24, or 32 bits per pixel for grayscale, RGB, and RGBA images respectively; RLE is supported.
power-of-two = 2^x example: (32x32,64x64....)