Reply
Thread Tools Display Modes
Unread 01-23-13, 04:22 AM   #1
gmarco
Premium Member
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 97
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.
gmarco is offline   Reply With Quote
Unread 01-23-13, 07:04 PM   #2
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,240
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).
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 01-23-13, 07:26 PM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,581
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

Seerah is offline   Reply With Quote
Unread 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.
Farmbuyer is offline   Reply With Quote
Unread 01-24-13, 09:49 PM   #5
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,240
I don't know. Maybe if you replaced "live frog" with "fire ant colony" we might be on the same page.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 01-25-13, 03:38 PM   #6
gmarco
Premium Member
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 97
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.
gmarco is offline   Reply With Quote
Unread 01-26-13, 01:43 PM   #7
gmarco
Premium Member
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 97
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:	194
Size:	39.3 KB
ID:	7538  Click image for larger version

Name:	img-008.png
Views:	184
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.
gmarco is offline   Reply With Quote
Unread 01-27-13, 05:20 AM   #8
gmarco
Premium Member
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 97
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:	181
Size:	77.8 KB
ID:	7545  
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
gmarco is offline   Reply With Quote
Unread 01-27-13, 05:48 AM   #9
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,240
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.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 01-28-13, 11:16 PM   #10
gmarco
Premium Member
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 97
Thanks very much for the answer Phanx.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
gmarco is offline   Reply With Quote
Reply

Go BackWoWInterface » 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