Alternatives to Ace GUI?

I am still fairly new to addon development, but most of my development has been in data processing and storage for some of my guild’s needs. I’d like to make a GUI now, but I want to make sure I know what options are out there. I have seen the Ace library and see it used in some addons - are there other options out there to help with the some of the GUI creation of an addon?

The default XML files have many templates to make polished-looking GUIs. Mentioning XML scares a lot of addon authors away, but you don’t need to create your GUIs in XML if you don’t want to. (But doing so is well worth it imho, even if to get some familiarity to better understand/modify Blizzard’s XML.)

This small snippet creates a dialog with an ok button and a checkbutton that looks like it belongs with the rest of the WoW UI:

local f = CreateFrame("Frame","BasicDialogDemo",UIParent,"BasicFrameTemplate")
f:SetSize(300,300)
f:SetPoint("CENTER")
f.TitleText:SetText("Basic Dialog Demo")

f.Inset = CreateFrame("Frame",nil,f,"InsetFrameTemplate")
f.Inset:SetPoint("TOPLEFT",6,-28)
f.Inset:SetPoint("BOTTOMRIGHT",-10,30)
f.Inset.Bg:SetDrawLayer("BACKGROUND",2)

f.OkButton = CreateFrame("Button",nil,f,"UIPanelButtonTemplate")
f.OkButton:SetPoint("BOTTOMRIGHT",-8,4)
f.OkButton:SetWidth(80)
f.OkButton:SetText("Ok")

f.CheckButton = CreateFrame("CheckButton",nil,f.Inset,"UICheckButtonTemplate")
f.CheckButton:SetSize(28,28)
f.CheckButton:SetPoint("TOPLEFT",10,-10)
f.CheckButton.text:SetText("Option to check")

Two good files to look at for templates include SharedXML\SharedUIPanelTemplates.xml and FrameXML\UIPanelTemplates.xml:

  • BasicFrameTemplate: creates the main dialog UI with the close button
  • InsetFrameTemplate: creates the black-marble backdrop to “content”
  • UIPanelButtonTemplate: creates the ubiquitous red buttons that appear at the bottom of panels through WoW
  • UICheckButtonTemplate: creates a checkbutton

You can get a lot of mileage out of the default UI’s XML, even once you start getting into more complex scrollframes with HybridScrollFrameTemplate.

3 Likes

This is great info and some solid tips! I’m used to seeing this type of GUI to some degree, so it’s not too intimidating. I was just struggling to find some examples to start learning from. This is a great starting point for me though for some basic layouts.