WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Graphics Help (https://www.wowinterface.com/forums/forumdisplay.php?f=14)
-   -   Background texture does not tile. Can you help me? (https://www.wowinterface.com/forums/showthread.php?t=52628)

griffonmtl 08-18-15 07:38 PM

Background texture does not tile. Can you help me?
 
1 Attachment(s)
Hello everyone,

I've started to learn how to do some AddOn (mostly for fun) and i have some problem with a background of a Frame. While I can put the image I want as background, it does not tile correctly. It tiles horizontally but not vertically (as you can see on the attached picture). I was wondering if someone can advise me on what is the problem with my code:

Code:

<Ui xmlns="http://www.blizzard.com/wow/ui/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <Script>
                print("ALLOOOOOO")
        </Script>
        <Frame name="TestUI" hidden="false">
                <Anchors>
                        <Anchor point="Center" />
                </Anchors>
                <Size>
                        <AbsDimension x="200" y="200" />
                </Size>
                <Backdrop bgFile="Interface\AddOns\HelloWorld\bg001.tga" tile="true"
                        edgeFile="Interface\DialogFrame\UI-DialogBox-Border">
                        <TileSize>
                                <AbsValue val="32" />
                        </TileSize>
                        <EdgeSize>
                                <AbsValue val="32" />
                        </EdgeSize>
                        <BackgroundInsets>
                                <AbsInset left="11" right="12" top="12" bottom="11" />
                        </BackgroundInsets>
                </Backdrop>
        </Frame>
 </Ui>

I did not provide the lua code, since there is nothing on it yet. Also, the file is power of 2 tga.

In advance... thanks

SDPhantom 08-19-15 02:07 AM

I'm sure someone is going to point out that you should code in pure Lua instead of using XML since it's easier to debug with. That put aside, I don't see any problem with your code minus a couple unnecessary bits. I'd chalk it up as one of the many quirks Blizzard has on their end.

Yukyuk 08-19-15 02:30 AM

Had the same problem with with my second addon that now is in development.
So I made my own 1024 by 1024 tga backgrounds. Big enough so the is no need for tiling.
Downside is that they are almost 4mb each. :eek:

And I second the advice for using using lua instead of xml.
In my first addon I started with xml for my frames.
Allthough it was a great learning process, at times it was pretty frustrating.
Xml is very unforgiving to typos and hard to debug.

Oh, and welcome to the club of lua/xml users.
Enjoy the ride and have fun. :)

griffonmtl 08-19-15 07:08 AM

LOL I've just saw that the <sript> part was just to check if the xml file was loaded correctly. I just want to use the xml for the frame and keep the lua for coding and assigning the event to the frames.


All times are GMT -6. The time now is 02:42 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI