So... I'm not very good with xml (old brain doesn't like it)
but I see a lot of UI examples in XML and I'm wondering if there is an easy way to convert them to lua code.
As an example I found this page
https://us.forums.blizzard.com/en/wo...-xml/1488298/2
Gello posted some XML code and I'm trying to convert it into lua code.
Code:
<Ui>
<Frame name="SimpleFrame" parent="UIParent" inherits="DefaultPanelTemplate">
<Size x="150" y="150"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Frames>
<Button parentKey="CloseButton" inherits="UIPanelCloseButtonDefaultAnchors"/>
<Frame parentKey="Inset" useParentLevel="true" inherits="InsetFrameTemplate">
<Anchors>
<Anchor point="TOPLEFT" x="10" y="-26" />
<Anchor point="BOTTOMRIGHT" x="-6" y="26" />
</Anchors>
</Frame>
<Button parentKey="OkButton" inherits="UIPanelButtonTemplate" text="Okay">
<Size x="90" y="22"/>
<Anchors>
<Anchor point="BOTTOMRIGHT" x="-6" y="4"/>
</Anchors>
<Scripts>
<OnClick>
self:GetParent():Hide()
</OnClick>
</Scripts>
</Button>
</Frames>
<Scripts>
<OnLoad>
self.TitleContainer.TitleText:SetText("Simple Frame")
</OnLoad>
</Scripts>
</Frame>
</Ui>
```
[/quote]
The frame part is simple enough but the button xml code has me baffled?
What would the lua code look like for the two buttons?