WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Beginner Question Question (https://www.wowinterface.com/forums/showthread.php?t=20503)

ThunderNimbus 02-10-09 05:25 PM

Beginner Question Question
 
I just got in to creating Addons for WoW the other day, and have been using the "World of Warcraft Programming" Book as a Guide. I'm trying to make a simple button frame in the center of the screen (I'll allow it to be moveable later) with the Dialog background and frame. I'm sure I just have some small error in here (it's modified from an example in the book) but I'm at a loss to find it. Any input would be appreciated.

Code:

<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
        <Button name="TradeAdvertiserFrame" parent="UIParent" enableMouse="true" movable="true" frameStrata="LOW">

        <Size x="100" y="40"/>

        <Anchors>
                <Anchor point="CENTER" relativePoint="CENTER" relativeTo="UIParent">
                </Anchor>
        </Anchors>


        <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
                <BackgroundInsets>
                        <AbsInset left="11" right="12" top="12" bottom="11"/>
                </BackgroundInsets>

                <TileSize>
                        <AbsValue val="32"/>
                </TileSize>
               
                <EdgeSize>
                        <AbsValue val="32"/>
                </EdgeSize>
        </Backdrop>

        <Layers>
                <Layer level="OVERLAY">
                        <FontString name="$parentText" inherits="GameFontNormalSmall" justifyH="CENTER" setAllPoints="true" text="TradeAdvertiser"/>
                </Layer>
        </Layers>


        </Button>
</Ui>


Duugu 02-10-09 06:25 PM

That's quite easy to solve. There's a needless equal:

<AbsInset left="11" right="12" top="12"= bottom="11"/>

ThunderNimbus 02-10-09 07:42 PM

Must be something else I'm missing as well. Took out the equal sign and it's still not showing.

Gemini_II 02-11-09 01:00 AM

I suck at coding but I noticed in your <Layers> section...
Code:

justifyH="CENTER"
should read (unless I'm mistaken then ignore me!)
Code:

justify="CENTER"

Duugu 02-11-09 08:22 AM

Quote:

Code:

justify="CENTER"

No Sir. :)
justifyV is a valid attribute.

Quote:

Must be something else I'm missing as well. Took out the equal sign and it's still not showing.
Just tested your code. It's valid and working.
Please show the toc file and (if there are any) the lua files.

Mera 02-11-09 09:22 AM

try puting a

<Offset>
<AbsDimension x="0" y="0"/>
</Offset>

inside <Anchor></Anchor>


All times are GMT -6. The time now is 05:06 PM.

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