Thanks. That helped a little I think, but I guess I don't understand how to apply that to my own addon.
Using this XML
Code:
<GuiXml>
<Controls>
<TopLevelControl name="MyFirstAddon" mouseEnabled="true" movable="true">
<Dimensions x="200" y="42" />
<Anchor point="CENTER" />
<OnUpdate>
MyFirstAddonUpdate()
</OnUpdate>
<OnMouseDown>
MyFirstAddonReset()
</OnMouseDown>
<Controls>
<Texture name="$(parent)BG" textureFile="MyFirstAddon/Assets/Counter_Background.dds" alpha="1.0">
<AnchorFill />
</Texture>
<Label name="$(parent)Counter" font="ZoFontWindowTitle" color="CFDCBD" wrapMode="ELLIPSIS" verticalAlignment="CENTER" text="Counter: ">
<AnchorFill />
</Label>
</Controls>
</TopLevelControl>
</Controls>
</GuiXml>
results in there being no background at all. I tried changing Texture back to Backdrop like it was before, but I guess I can't set a texture with that, or I'm not doing it right, because the background is just white then. Am I just putting things in the wrong order?
This is my LUA if it matters
Code:
local counter = 1
function MyFirstAddonUpdate()
MyFirstAddonCounter:SetText(string.format("Counter: %d", counter))
counter = counter + 1
end
function MyFirstAddonReset()
counter = 0
end