View Single Post
11-25-13, 03:27 AM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Malsomnus View Post
Which reminds me, how on earth do I make my add-on appear in the game's interface options? If that's in any way simpler than building my own frames, I can think of several add-ons that could totally do with that sort of thing.
Yes, using the Interface Options window is easier than building your own config frame. It also provides a more convenient and consistent experience for users.

For simple examples that only use the game's native APIs and templates (no libraries or custom templates) check out my addons BetterBattlePetTooltip and PetBattleAutoForfeit. Both create a simple panel in the Interface Options window with a few controls; BBPT only uses checkboxes, and PBAF has a checkbox and sliders.

Personally I would never use AceGUI directly, as everything I've read and heard about it makes it out to be a nightmare to work with.

I do use AceConfig -- which takes an AceConfig options table, and automatically generates a GUI using AceGUI -- for a couple addons with complex, dynamic options tables (eg. Grid, where you need to dynamically add sections for each status) but for addons with a fixed set of options I prefer to roll my own. It takes about the same amount of code in your addon to write your own checkbox (see BBPT) vs. define a checkbox in an AceConfig table, and writing your own spares you from having to load AceConfig+AceGUI (~250KB). My general view on libraries is that if the library code is significantly larger than the addon code itself, and I can implement the functionality myself in significantly less code without a lot of effort, I should not use the library. This rules out me ever using libraries like AceEvent or AceLocale, but also means I will use LibPetJournal (which nearly doubles the size of my addon) since I'd need approximately the same amount of code to duplicate its functionality myself.

Most of my other addons are basically using only native APIs, but I've written my own custom templates instead of using the default ones (eg. sliders with mouse-wheel support, or scrolling dropdown menus) and there are several other addon authors who've done the same (eg. Tekkub's addons use his custom tekKonfig widgets).
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote