Thread Tools Display Modes
01-23-13, 04:22 AM   #1
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
Configuration Frame

Hi all,

I'd like to add to my addons the possibility to be configured by a panel in Interface -> addons in game.

I am here to ask which is the better way to implement it, i.e. if it is better to use ACE3 or the standard options and if there is some places where I can check some code.

Thanks to all.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
01-23-13, 07:04 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
My answer would depend on the complexity of your configuration.

If you're planning an extensive multi-panel UI with dozens of options on each panel -- for example, Grid's config UI -- then I'd suggest using AceConfig or, if you're a serious masochist, AceGUI directly.

If you're planning a single panel, I'd suggest just writing it yourself using Blizzard templates (see PetBattleAutoForfeit for an example).

If you're planning a few panels with a few options each, I'd suggest either writing it yourself using Blizzard templates, or using some mini-libs to simplify generating the widgets, like tekKonfig (see StealYourCarbon or some of Tekkub's other addons) or PhanxConfig (see ShieldsUp for an example).
__________________
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
01-23-13, 07:26 PM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I've done all of the above myself. It all depends on how much you need.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
01-24-13, 11:38 AM   #4
Farmbuyer
A Cyclonian
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 43
Originally Posted by Phanx View Post
or, if you're a serious masochist, AceGUI directly.
Anytime I need to work with AceGUI directly, I begin my coding session by swallowing a live frog.

I can then proceed, confident that nothing worse can happen to me for the rest of the day.
  Reply With Quote
01-24-13, 09:49 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I don't know. Maybe if you replaced "live frog" with "fire ant colony" we might be on the same page.
__________________
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
01-25-13, 03:38 PM   #6
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
Thanks very much all for the kind replies.

I'll have all the weekend to check your suggestions :-)

Thanks again.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
01-26-13, 01:43 PM   #7
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
I have updated a couple of addons ... and with Phanx suggestions it was easier than I thought.

Thanks again.
Attached Thumbnails
Click image for larger version

Name:	img-010.png
Views:	351
Size:	39.3 KB
ID:	7538  Click image for larger version

Name:	img-008.png
Views:	337
Size:	18.8 KB
ID:	7540  
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.

Last edited by gmarco : 01-26-13 at 01:47 PM.
  Reply With Quote
01-27-13, 05:20 AM   #8
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
Hi,

Uhm there something strange.

I made the modifications for the config panel to 2 addons . As I said it was very easy using the code by PetBattleAutoForfeit Phanx addon.

But now I am experiencing a strange iussue I am not able to understand.

I see that one addon (autopsy) have a very nice about panel due to the:

Lua Code:
  1. if LibStub and LibStub("LibAboutPanel", true) then
  2.     options.about = LibStub("LibAboutPanel").new(options.name, ADDON)
  3. end

This code is also present in the other addon (aggromon) but it doesn't have the about panel.

I am quite sure both addon code are quite similar (a lot of cut & paste) so it is very strange thing.

Could it be dependant by the load order or by another addon ? The one that works is loaded after.

Thanks.
Attached Thumbnails
Click image for larger version

Name:	img-001.png
Views:	336
Size:	77.8 KB
ID:	7545  
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
01-27-13, 05:48 AM   #9
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Yes; as you can see from the first line of the snippet you posted, the About panel is only created if the LibAboutPanel library is loaded when that code runs. If you don't embed LibAboutPanel in your addon, then it's only going to be available if some other addon has already loaded it before your addon loaded.
__________________
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
01-28-13, 11:16 PM   #10
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
Thanks very much for the answer Phanx.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Configuration Frame

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off