ZAM's Minion, currently in open beta, is a new AddOn manager optimized for use with ESO. Install, update & manage AddOns... Learn more!
Download
(27 Kb)
Download
Updated: 11/02/14 02:03 PM
Pictures
File Info
Compatibility:
Craglorn (1.1)
Updated:11/02/14 02:03 PM
Created:02/14/14 10:28 PM
Downloads:11,433
Favorites:105
MD5:
LibAddonMenu  Popular! (More than 5000 hits)
Version: 2.0 r16
by: Seerah [More]
Notice: I have retired from ESO. If you wish to take over this addon, please send me a private message.

LibAddonMenu-2.0 is now released!
Your addons will continue to work under LAM-1.0, however that version of the library will no longer be receiving updates, and you will not receive any benefits of LAM-2.0.

** NOTE: If you have already updated your addon's settings panel to LAM2, but are using a version earlier than r6, please update your copy of the lib in the addon. This will avoid duplicate LAM entries in the game's Settings menu. (This bug does not occur in revisions 6+.)**


LibAddonMenu-2.0 is a library to aid addon authors in creating a configuration GUI for their addons which is located in the game's Settings menu. It supports the ability to have all of a user's addon options located in the same panel.

You may see ZAM_Stats for an example of usage.


HOW TO USE:

--Including the library with your addon--
You may either embed the library and LibStub in your addon and load the files from your addon manifest, or have the library installed like any other normal addon.

If your addon embeds the library, you may place this line in your manifest file, just in case the user also has a standalone version installed.
Code:
## OptionalDependsOn: LibAddonMenu-2.0
If you are depending on the library being installed separately and are not embedding it, then you must include this line in your text file.
Code:
## DependsOn: LibAddonMenu-2.0
Either way you choose, LibStub will ensure that only one copy of the library (the newest revision) is loaded into memory.

When embedding the libary, remove the internal LibAddonMenu-2.0 folder from the main library download. I usually place my libraries in a sub-folder called "libs", but you may put them wherever you like in your addon directory. This is how I would then list the files in my manifest. (LAM2's widget controls are broken out into their own files to keep their code clean - this is why there is so many. Good thing you only have to copy-paste this once!)

Code:
libs\LibAddonMenu-2.0\LibAddonMenu-2.0.lua
libs\LibAddonMenu-2.0\controls\panel.lua
libs\LibAddonMenu-2.0\controls\submenu.lua
libs\LibAddonMenu-2.0\controls\button.lua
libs\LibAddonMenu-2.0\controls\checkbox.lua
libs\LibAddonMenu-2.0\controls\colorpicker.lua
libs\LibAddonMenu-2.0\controls\custom.lua
libs\LibAddonMenu-2.0\controls\description.lua
libs\LibAddonMenu-2.0\controls\dropdown.lua
libs\LibAddonMenu-2.0\controls\editbox.lua
libs\LibAddonMenu-2.0\controls\header.lua
libs\LibAddonMenu-2.0\controls\slider.lua
libs\LibAddonMenu-2.0\controls\texture.lua
(Don't forget to also embed LibStub and have it listed to load prior to LibAddonMenu!)


--Getting the library from LibStub (required)--
Lua Code:
  1. local LAM = LibStub:GetLibrary("LibAddonMenu-2.0")
  2. --OR--
  3. local LAM = LibStub("LibAddonMenu-2.0")
  4.      --returns a reference to the library table


Please see the LAM-2.0 page on my portal for guides and docs, as well as a list of differences between LAM-1.0 and LAM-2.0

Details on LAM2 data tables
2.0 r16
- updated for changes in 100010
- thanks to Garkin for alerting me of changes needed and for testing on the test server
- Spanish support added, translation provided by Luisen75 for their Spanish project

2.0 r14
- fixed bug where the LAM-RefreshPanel callback was being registered with CALLBACK_MANAGER multiple times
- fixed highlighting of entries in the game Settings menu (Addon Settings now properly highlights and other entries go back to normal)

2.0 r13
- one last bug ran out from anunder the dresser - I smashed it hopefully!

2.0 r12
- fix one bug another shows up...

2.0 r11
- don't overwrite widgets list if table already exists (in case an external lib or addon registers a new widget type)
- headers, descriptions, submenus and custom widgets now have the ability to update their text when the panel and other controls refresh (simply change the name/text in the controlData table)
- custom controls now have the ability to refresh with other controls and your panel - there is a new optional field in the data table called refreshFunc (when the panel refreshes, this function will be called)

2.0 r10
- fixed display of warning icon for dropdown controls
- update LibStub.lua

2.0 r9
- added Russian locale support for RuESO project
- fixed anchoring issue with addon list (addon names are now properly in the scroll frame, so the few of you with tons installed should have no issue any longer)
- added ability to close submenus from the bottom of the submenu (there is a small strip along the bottom of the submenu that is clickable)
- edited each control to better support custom-created UIs via LAM and the parent passed through to the create functions

2.0 r8
- changed border texture around panel and addon list
- expanded maximum size of submenus from 1500 to 2500

2.0 r7
- shortened game menu entry for French and German localizations (so the text doesn't get cut off)
- fixed checkbox label coloring bug (when a checkbox that is set to "off" is re-enabled by another setting)
- fixed multi-line editbox bug (where text didn't display)
- added mousewheel scrolling for multi-line editboxes

2.0 r6
- added "LAM-PanelControlsCreated" callback when you panel has been shown for the first time and your controls have now been created
- fixed duplicate Addon Settings panels when you have a newer version of LAM overwriting an older version
- finished localizing stuff that wasn't localized yet
- added "sort" field to dropdown control

2.0 r5
- fix RefreshPanel function so that all controls now update
- add RefreshPanel call to ForceDefaults function

2.0 r4
- fix for me being an idiot. Sorry guys ><

2.0 r3
- fixed checkboxes making a sound when just refreshing
- fixed error when the lib is loaded standalone, but no addons are registered with it
- fixed error when LAM updates itself to a newer version (won't try to create two of the same frame)

2.0 r2
- LAM-2.0 is now released! See http://www.esoui.com/portal.php?&id=5&pageid=10 for a list of differences between LAM1 and LAM2, as well as a guide for usage and the library's docs

-----------------
1.0 r8
- updated APIVersion to 100004
- changed submenu so scroll bar doesn't overlap contents
- submenu should hopefully no longer occasionally show up behind the options panel

1.0 r7
- the defaults button now properly hides for each panel (Note: the keybind still works, I can't seem to get rid of that, but at least the prompt is hidden now)
- LAM now supports sub menus! See the description page for docs on usage

1.0 r6
- copy/paste fail when changing the name of an arg. Description titles will no longer hide from you.

1.0 r5
- exposed the widgets created via return

1.0 r4
-new widget: Description

1.0 r3
-fixed error with color picker in new patch

1.0 r2
-fixed bug when more than one addon panel is created
Archived Files (14)
File Name
Version
Size
Author
Date
2.0 r14
26kB
Seerah
07/27/14 10:17 PM
2.0 r13
26kB
Seerah
07/20/14 09:35 PM
2.0 r12
26kB
Seerah
07/20/14 07:55 PM
2.0 r11
26kB
Seerah
07/19/14 02:49 PM
2.0 r10
25kB
Seerah
07/13/14 09:18 PM
2.0 r9
25kB
Seerah
07/05/14 06:55 PM
2.0 r8
25kB
Seerah
06/22/14 09:47 PM
2.0 r7
25kB
Seerah
06/15/14 05:17 PM
2.0 r6
25kB
Seerah
06/13/14 11:28 PM
2.0 r5
25kB
Seerah
06/12/14 10:32 PM
2.0 r4
25kB
Seerah
06/11/14 08:56 PM
2.0 r3
25kB
Seerah
06/11/14 07:49 PM
2.0 r2
24kB
Seerah
06/10/14 10:06 PM
1.0 r8
6kB
Seerah
05/24/14 10:01 PM


Post A Reply Comment Options
Unread 11/05/14, 11:10 AM  
hannibalektr

Forum posts: 0
File comments: 8
Uploads: 0
downloaded fine for me but have to re config everytime

downloaded fine for me but have to re config everytime
hannibalektr is offline Report comment to moderator  
Reply With Quote
Unread 11/04/14, 09:11 PM  
SteveCampsOut
 
SteveCampsOut's Avatar

Forum posts: 1
File comments: 46
Uploads: 0
File 404's has been removed or deleted.
SteveCampsOut is offline Report comment to moderator  
Reply With Quote
Unread 11/03/14, 11:03 AM  
dominoid
AddOn Author - Click to view AddOns

Forum posts: 14
File comments: 151
Uploads: 1
Originally Posted by Garkin
Originally Posted by dominoid
Any chance someone can post a LAM 1 update for 1.5. Hopefully it's just a few lines that need changing. I have a handful of add-ons that still use it. Thanks in advance.
LibAddonMenu-1.0-r9_for_Update5.zip
Thanks. I was just going through your Azurah changes! Lol
dominoid is offline Report comment to moderator  
Reply With Quote
Unread 11/03/14, 10:49 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 533
File comments: 611
Uploads: 23
Originally Posted by dominoid
Any chance someone can post a LAM 1 update for 1.5. Hopefully it's just a few lines that need changing. I have a handful of add-ons that still use it. Thanks in advance.
EDIT: Updated link - LibAddonMenu-1.0-r10.zip (fixed bug with submenus)
__________________
@Garkin / EU - megaserver / CSF guild
My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, ... (full list)
Updated, modified and test addon versions are in my DROPBOX folder.
Last edited by Garkin : 11/03/14 at 03:04 PM.
Garkin is online now Report comment to moderator  
Reply With Quote
Unread 11/03/14, 08:51 AM  
dominoid
AddOn Author - Click to view AddOns

Forum posts: 14
File comments: 151
Uploads: 1
Any chance someone can post a LAM 1 update for 1.5. Hopefully it's just a few lines that need changing. I have a handful of add-ons that still use it. Thanks in advance.
Last edited by dominoid : 11/03/14 at 08:51 AM.
dominoid is offline Report comment to moderator  
Reply With Quote
Unread 11/02/14, 06:34 PM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 533
File comments: 611
Uploads: 23
The latest version of LibAddonMenu-2.0 is for Update 5. If it doesn't work, you do not have Update 5...
Update 5 will be coming on Monday for NA, and Tuesday for EU (source).
__________________
@Garkin / EU - megaserver / CSF guild
My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, ... (full list)
Updated, modified and test addon versions are in my DROPBOX folder.
Last edited by Garkin : 11/02/14 at 06:34 PM.
Garkin is online now Report comment to moderator  
Reply With Quote
Unread 11/02/14, 06:26 PM  
Cerulean2013

Forum posts: 21
File comments: 42
Uploads: 0
Originally Posted by Kevinmon
Latest update broke the addon menu so I can't access any settings. Also gives a UI error upon login.



same problem for me
Cerulean2013 is offline Report comment to moderator  
Reply With Quote
Unread 11/02/14, 06:19 PM  
Kevinmon

Forum posts: 1
File comments: 55
Uploads: 0
Latest update broke the addon menu so I can't access any settings. Also gives a UI error upon login.



Last edited by Kevinmon : 11/02/14 at 06:22 PM.
Kevinmon is offline Report comment to moderator  
Reply With Quote
Unread 11/01/14, 03:19 PM  
katkat42
AddOn Author - Click to view AddOns

Forum posts: 134
File comments: 114
Uploads: 6
Originally Posted by Seerah
Yes, I do have a working version of LAM ready to go, just slightly different than Garkin's version. I was waiting to hear when the patch will go live. I'll upload it on Sunday.
Thank you for your work on this, Seerah! You're awesome!
__________________
"GUIs are tough. Let's go wumpus hunting."
katkat42 is offline Report comment to moderator  
Reply With Quote
Unread 10/31/14, 07:21 PM  
Seerah
Fishing Trainer
 
Seerah's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 646
File comments: 112
Uploads: 1
Originally Posted by Ayantir
Hello,

1.5 will be live monday for US and Tuesday for EU

Could we get an up to date version of LAM maybe a little bit before to package our stuff nicely ?
I think a great majority of users will try to download our stuff as soon many addon use your (great) library.

PS: I've tested LAM on pts with the Garkin's dropbox version, no problem at all !
Yes, I do have a working version of LAM ready to go, just slightly different than Garkin's version. I was waiting to hear when the patch will go live. I'll upload it on Sunday.
Seerah is offline Report comment to moderator  
Reply With Quote
Unread 10/31/14, 03:15 AM  
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view AddOns

Forum posts: 52
File comments: 93
Uploads: 7
Hello,

1.5 will be live monday for US and Tuesday for EU

Could we get an up to date version of LAM maybe a little bit before to package our stuff nicely ?
I think a great majority of users will try to download our stuff as soon many addon use your (great) library.

PS: I've tested LAM on pts with the Garkin's dropbox version, no problem at all !
Ayantir is offline Report comment to moderator  
Reply With Quote
Unread 10/21/14, 04:24 PM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 533
File comments: 611
Uploads: 23
Re: lam:OpenToPanel / update 5

Originally Posted by Criscal
Hi,

I'm getting an issue with calling ZO_TreeEntry_OnMouseUp on update 5 as well. In my addon, I'm using lam:OpenToPanel to get to the settings by clicking a button.

Criscal
Yup, reported a few posts below:
Originally Posted by Garkin
...

EDIT:
I have found another issue - ZO_OptionsWindow_ChangePanels() is now replaced by KEYBOARD_OPTIONS:ChangePanels(panel).
So in the LibAddonMenu-2.0.lua change lines 60-64 from:
Lua Code:
  1. ZO_OptionsWindow_ChangePanels(lam.panelID)
  2. if not lam.panelSubCategoryControl then
  3.     lam.panelSubCategoryControl = _G["ZO_GameMenu_InGameNavigationContainerScrollChildZO_GameMenu_SubCategory"..(lam.panelID + 1)]
  4. end
  5. ZO_TreeEntry_OnMouseUp(lam.panelSubCategoryControl, true)
to single line:
Lua Code:
  1. KEYBOARD_OPTIONS:ChangePanels(lam.panelID)

...
Link to the version working with Update 5 is in the feature request here:
http://www.esoui.com/portal.php?id=5...&featureid=536
__________________
@Garkin / EU - megaserver / CSF guild
My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, ... (full list)
Updated, modified and test addon versions are in my DROPBOX folder.
Garkin is online now Report comment to moderator  
Reply With Quote
Unread 10/21/14, 03:50 PM  
Criscal
AddOn Author - Click to view AddOns

Forum posts: 9
File comments: 54
Uploads: 3
lam:OpenToPanel / update 5

Hi,

I'm getting an issue with calling ZO_TreeEntry_OnMouseUp on update 5 as well. In my addon, I'm using lam:OpenToPanel to get to the settings by clicking a button.

Criscal
Criscal is online now Report comment to moderator  
Reply With Quote
Unread 10/16/14, 06:45 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 533
File comments: 611
Uploads: 23
Re: Re: PTS Server patch

Originally Posted by Fyrakin
I found that controls\button.lua also need a little update

in function LAMCreateControl.button

Code:
+	local data = {}
+	data.tooltipText =buttonData.tooltip
+	button.data = data
	button:SetHandler("OnMouseEnter", ZO_Options_OnMouseEnter)
This is not just for the button widget. All widgets use functon ZO_Options_OnMouseEnter(control) in order to display tooltips. This function was changed in Update 5. Now it looks for tooltip text in the "control.data.tooltipText" instead of "control.tooltipText".
Probably the best solution would be change key name tooltip to tooltipText in the options table, but it means that all addons needs to be updated or at least there must be function that will update options table automatically.

Proposed changes:
LibAddonMenu-2.0.lua:
Code:
+   local UpdateOptionsTable

    function lam:RegisterOptionControls(addonID, optionsTable) --optionsTable = {sliderData, buttonData, etc}
+       UpdateOptionsTable(optionsTable)
        addonToOptionsMap[addonID] = optionsTable
    end

+   UpdateOptionsTable = function(optionsTable)
+       for _, widgetData in ipairs(optionsTable) do
+           if widgetData.type == "submenu" then
+               UpdateOptionsTable(widgetData.controls)
+           end
+           if widgetData.tooltipText == nil then
+               widgetData.tooltipText = widgetData.tooltip
+               widgetData.tooltip = nil
+           end
+       end
+   end
button.lua:
Code:
-   button.tooltipText = buttonData.tooltip
+   button.data = { tooltipText = buttonData.tooltipText }
colorpicker.lua:
Code:
-   control.tooltipText = colorpickerData.tooltip
dropdown.lua:
Code:
-   control.tooltipText = dropdownData.tooltip
editbox.lua:
Code:
-   control.tooltipText = editboxData.tooltip
checkbox.lua:
Code:
-   control.tooltipText = checkboxData.tooltip
slider.lua:
Code:
-   control.tooltipText = sliderData.tooltip
submenu.lua:
Code:
-   if submenuData.tooltip then
+   if submenuData.tooltipText then
-       label.tooltipText = submenuData.tooltip
+       label.data = { tooltipText = submenuData.tooltipText }
        label:SetHandler("OnMouseEnter", ZO_Options_OnMouseEnter)
        label:SetHandler("OnMouseExit", ZO_Options_OnMouseExit)
    end
texture.lua:
Code:
-   if textureData.tooltip then
+   if textureData.tooltipText then
        texture:SetMouseEnabled(true)
-       texture.tooltipText = textureData.tooltip
+       texture.data = { tooltipText = textureData.tooltipText }
        texture:SetHandler("OnMouseEnter", ZO_Options_OnMouseEnter)
        texture:SetHandler("OnMouseEnter", ZO_Options_OnMouseExit)
    end
(And of course, you will need to increase all widget versions)
__________________
@Garkin / EU - megaserver / CSF guild
My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, ... (full list)
Updated, modified and test addon versions are in my DROPBOX folder.
Last edited by Garkin : 10/16/14 at 06:58 AM.
Garkin is online now Report comment to moderator  
Reply With Quote
Unread 10/16/14, 02:00 AM  
Fyrakin
 
Fyrakin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 39
File comments: 222
Uploads: 4
Re: PTS Server patch

I found that controls\button.lua also need a little update

in function LAMCreateControl.button

Code:
+	local data = {}
+	data.tooltipText =buttonData.tooltip
+	button.data = data
	button:SetHandler("OnMouseEnter", ZO_Options_OnMouseEnter)
Fyrakin is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.