ZAM's Minion, currently in open beta, is a new AddOn manager optimized for use with ESO. Install, update & manage AddOns... Learn more!
Download
(30 Kb)
Download
Updated: 02/22/15 11:09 AM
Pictures
File Info
Compatibility:
Update 6 (1.6.5)
Update 5 (1.5.2)
Updated:02/22/15 11:09 AM
Created:02/14/14 10:28 PM
Downloads:18,030
Favorites:131
MD5:
1.6.5
LibAddonMenu  Popular! (More than 5000 hits)
Version: 2.0 r17
by: sirinsidiator, Seerah
Since I (sirinsidiator) have taken over development of LAM-2.0 I decided it will be in the best interest of everyone to make future development a group effort.
With the consent of Seerah I have put LAM-2.0 under The Artistic License 2.0 and created a github project in order to make collaborations possible.
I also want to thank everyone who participated in planning and realizing upcoming changes, especially votan, merlight and Garkin.

If you came here because a message in chat told you so,
then you are using an outdated addon that relies on an older version of LAM-2.0 which might not be compatible with ESO update 6.
But no need to panic. There are a few things you can do in order to get it to work again:
  1. Update your addons. Maybe the author already fixed the problem.
  2. Try to find out which addon uses the outdated version and ask for help in the comment section.
  3. Ask for help in our comment section.
  4. Replace LibAddonMenu-2.0 in all your addons with the newest version.

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 are using a version of LAM-2.0 earlier than r17, please update your copy of the lib in the addon. This will avoid problems with loading future versions of LAM.**


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 wiki on github 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 r17
- updated for changes in 100011
- fixed OpenToPanel function
- fixed possible error with combobox names
- half width control no longer have a fixed height and instead scale automatically now
- changed controls to no longer use top level windows
- fixed problems with the loading order and added warning if an old version gets initialized first
A big thank you to everyone who helped making these changes, especially votan, merlight and Garkin!

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 (15)
File Name
Version
Size
Author
Date
2.0 r16
27kB
sirinsidiator
11/02/14 02:03 PM
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 03/24/15, 12:32 PM  
Isilvar307

Forum posts: 0
File comments: 5
Uploads: 0
Re: Re: Need help please

I thought TiEmote Extented is separate mod with extra features from TiEmote and i checked TiEmote's version.
But for Undiscovered i thought it was still the previous version.
When i checked in this link it was not in the lists yet.
https://github.com/sirinsidiator/ESO...ons-using-LAM2
Well, i guess i have to use TiEmote Extented from now on.

As for the Minion, it has a bug which i reported and has been fixed one time, but with every update its disfixes!
That is why i am using NMM and all everything is fine.

Thanks alot for the info about those two addons.
Isilvar307 is offline Report comment to moderator  
Reply With Quote
Unread 03/23/15, 05:24 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 117
File comments: 153
Uploads: 11
Re: Need help please

Originally Posted by Isilvar307
I do not have any knowledge for editing addons.
But i checked from each addon's "txt", i saw in that APB and SkyShards have "OptionalDependsOn: LibAddonMenu-2.0 ", SimpleClock and "OptionalDependsOn: LibAddonMenu-1.0 ", TiEmote does not have and Undiscovered have "OptionalDependsOn: LibStub LibAddonMenu".
So what must i do?
Just replace "LibAddonMenu-1.0" with "-2.0" and "LibStub LibAddonMenu" with "LibAddonMenu-2.0"?
Also i never used this addon LibAddonMenu before.
Should i download and use it somehow in order to update the addons i have?
And i agree 100% with joshmiller83, there are many people who don't know what to do for this matter and its not our work to update those addons, one mistake can cause bad issues in the game which may not be fixed by just uninstalling the addon, but it may need to do a major repair or the whole game reinstall from begin, that is something people do not want who have slow internet.
Neither is it my job to update the addons that use LibAddonMenu.
I am not sure why you think that you have to update or use LAM2 yourself?
It is a library that is included in other addons. If they are not updated, then you should report it to their respective comment section or ask in the addon requests forum if somebody can update it.

Also TiEmote and Undiscovered have both been updated to work with LAM2 already.
If you haven't already done so, you should start using Minion which will keep track of your addons and allows you to update them with a single click.
sirinsidiator is offline Report comment to moderator  
Reply With Quote
Unread 03/22/15, 12:10 PM  
Isilvar307

Forum posts: 0
File comments: 5
Uploads: 0
Need help please

I do not have any knowledge for editing addons.
But i checked from each addon's "txt", i saw in that APB and SkyShards have "OptionalDependsOn: LibAddonMenu-2.0 ", SimpleClock and "OptionalDependsOn: LibAddonMenu-1.0 ", TiEmote does not have and Undiscovered have "OptionalDependsOn: LibStub LibAddonMenu".
So what must i do?
Just replace "LibAddonMenu-1.0" with "-2.0" and "LibStub LibAddonMenu" with "LibAddonMenu-2.0"?
Also i never used this addon LibAddonMenu before.
Should i download and use it somehow in order to update the addons i have?
And i agree 100% with joshmiller83, there are many people who don't know what to do for this matter and its not our work to update those addons, one mistake can cause bad issues in the game which may not be fixed by just uninstalling the addon, but it may need to do a major repair or the whole game reinstall from begin, that is something people do not want who have slow internet.
Last edited by Isilvar307 : 03/22/15 at 12:18 PM.
Isilvar307 is offline Report comment to moderator  
Reply With Quote
Unread 03/17/15, 11:09 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 117
File comments: 153
Uploads: 11
Re: decimals on slider control

Originally Posted by Carter_DC
Could you add a round to x decimals option for the sliders that uses decimal increments ?

On a 0 to 10 slider with 0.1 increments, i can't read the correct values, cuz of all the decimals that show up in the text edit under the slider.

I can't seem to get any results when trying to modify the slider.lua (guess the lib is loaded one time only with whatever other addon i have that needs it)
I opened a ticket for you over at github and will look into it when I have more time. Currently a bit busy with other things.
You can try votan's workarounds for now. Docs are located here.
sirinsidiator is offline Report comment to moderator  
Reply With Quote
Unread 03/17/15, 08:05 AM  
votan
 
votan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 66
File comments: 80
Uploads: 6
Re: decimals on slider control

Originally Posted by Carter_DC
Could you add a round to x decimals option for the sliders that uses decimal increments ?

On a 0 to 10 slider with 0.1 increments, i can't read the correct values, cuz of all the decimals that show up in the text edit under the slider.
Workaround 1: Multiple your value in the getFunc and divide it in the setFunc.
Workaround 2: Register your own slider control type. See docs. (I did not do that before)

Originally Posted by Carter_DC
I can't seem to get any results when trying to modify the slider.lua (guess the lib is loaded one time only with whatever other addon i have that needs it)
Correct. That's why it was so important, that everybody updates to r17.
__________________
@votan73 (EU - megaserver)
votan is online now Report comment to moderator  
Reply With Quote
Unread 03/17/15, 07:49 AM  
Carter_DC
AddOn Author - Click to view AddOns

Forum posts: 11
File comments: 6
Uploads: 3
decimals on slider control

Could you add a round to x decimals option for the sliders that uses decimal increments ?

On a 0 to 10 slider with 0.1 increments, i can't read the correct values, cuz of all the decimals that show up in the text edit under the slider.

I can't seem to get any results when trying to modify the slider.lua (guess the lib is loaded one time only with whatever other addon i have that needs it)
Carter_DC is offline Report comment to moderator  
Reply With Quote
Unread 02/24/15, 02:04 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 117
File comments: 153
Uploads: 11
Re: LAM2 r17?

Originally Posted by joshmiller83
How hard is it for someone who isn't an author to update an addon to r17 from r14 or r16? Is there a lot of changes or is it pretty much a simple drag'n'drop? I am not illiterate or anything as I have been in tech support and IT/IS for 12 years now but I am not skilled in LUA yet, or any other language anymore.
Simply replacing the files should be enough. You can see a list of all addons (from esoui) that use LAM2 here.

There is one scenario where you have to update the addon code, but it will print a different warning in chat should this be the case.
sirinsidiator is offline Report comment to moderator  
Reply With Quote
Unread 02/23/15, 06:49 PM  
joshmiller83
AddOn Super User
 
joshmiller83's Avatar
Premium Member

Forum posts: 49
File comments: 173
Uploads: 0
Question LAM2 r17?

How hard is it for someone who isn't an author to update an addon to r17 from r14 or r16? Is there a lot of changes or is it pretty much a simple drag'n'drop? I am not illiterate or anything as I have been in tech support and IT/IS for 12 years now but I am not skilled in LUA yet, or any other language anymore.
joshmiller83 is offline Report comment to moderator  
Reply With Quote
Unread 02/14/15, 06:54 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 761
File comments: 996
Uploads: 32
Re: Re: Re: Re: Dropdown

Originally Posted by votan
Originally Posted by Garkin
Counter should be panel specific, probably something like I have done in my fontblock widget (see new update of Srendarr or Azurah).
Ah, a counter per parent. Good idea, but not reliable. For example in "No, thank you" parent:GetName() and controlName and dropdownData.reference are empty string. Causing "Duplicate name: Combobox1"
Others may have the same problem.
panel is using LAMCreateControl.scrollCount already. So I think it is ok this way:
Lua Code:
  1. local comboboxCount
  2. local name = parent:GetName()
  3. if not name or #name == 0 then
  4.     name = "LAM"
  5.     comboboxCount = LAMCreateControl.comboboxCount or 0
  6.     comboboxCount = comboboxCount + 1
  7.     LAMCreateControl.comboboxCount = comboboxCount
  8. else
  9.     comboboxCount = parent.comboboxCount or 0
  10.     comboboxCount = comboboxCount + 1
  11.     parent.comboboxCount = comboboxCount
  12. end
  13. control.combobox = wm:CreateControlFromVirtual(zo_strjoin(nil, name, "Combobox", comboboxCount), control, "ZO_ComboBox")
For "good" parents, the dropdowns have a count per parent and as a failback there is a global counter, too.
Thats because parent could be also submenu, not just panel.

Lua Code:
  1. local panel = parent.panel or parent
  2. if not panel.comboboxCount then
  3.     panel.comboboxCount = 0
  4. end
  5. panel.comboboxCount = panel.comboboxCount + 1
  6.  
  7. control.combobox = wm:CreateControlFromVirtual(panel:GetName().."Combobox"..panel.comboboxCount, control, "ZO_ComboBox")
__________________
@Garkin / EU (CSF guild) / NA (Maelstrom guild)
My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you!, ... (full list)
Updated, modified and test addon versions are in my DROPBOX folder.
Garkin is offline Report comment to moderator  
Reply With Quote
Unread 02/14/15, 04:02 AM  
votan
 
votan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 66
File comments: 80
Uploads: 6
Re: Re: Re: Dropdown

Originally Posted by Garkin
Counter should be panel specific, probably something like I have done in my fontblock widget (see new update of Srendarr or Azurah).
Ah, a counter per parent. Good idea, but not reliable. For example in "No, thank you" parent:GetName() and controlName and dropdownData.reference are empty string. Causing "Duplicate name: Combobox1"
Others may have the same problem.
panel is using LAMCreateControl.scrollCount already. So I think it is ok this way:
Lua Code:
  1. local comboboxCount
  2. local name = parent:GetName()
  3. if not name or #name == 0 then
  4.     name = "LAM"
  5.     comboboxCount = LAMCreateControl.comboboxCount or 0
  6.     comboboxCount = comboboxCount + 1
  7.     LAMCreateControl.comboboxCount = comboboxCount
  8. else
  9.     comboboxCount = parent.comboboxCount or 0
  10.     comboboxCount = comboboxCount + 1
  11.     parent.comboboxCount = comboboxCount
  12. end
  13. control.combobox = wm:CreateControlFromVirtual(zo_strjoin(nil, name, "Combobox", comboboxCount), control, "ZO_ComboBox")
For "good" parents, the dropdowns have a count per parent and as a failback there is a global counter, too.
__________________
@votan73 (EU - megaserver)
votan is online now Report comment to moderator  
Reply With Quote
Unread 02/13/15, 02:37 PM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 761
File comments: 996
Uploads: 32
Re: Re: Dropdown

Originally Posted by votan
Originally Posted by Garkin
When dropdown widget is updated comboboxCount is reset back to 1. Usually it doesn't matter, but if you are creating controls directly (and you don't have any other option if you want to modify created controls), some comboboxes could already exist and then you will get an UI error because of duplicate cotrol names.
I see, but how preventing this? Would you agree to:
Lua Code:
  1. LAMCreateControl.comboboxCount = LAMCreateControl.comboboxCount or 1
  2. function LAMCreateControl.dropdown(parent, dropdownData, controlName)
  3.     // ...
  4.  
  5.     local comboboxCount = LAMCreateControl.comboboxCount
  6.     control.combobox = wm:CreateControlFromVirtual(parent:GetName().."Combobox"..comboboxCount, control, "ZO_ComboBox")
  7.     comboboxCount = comboboxCount + 1
  8.     LAMCreateControl.comboboxCount = comboboxCount
  9.     // ...
  10. end

Beside that:
I integrated the other fixes in my version and they work well. No half width glitches, no dropdown errors.
Counter should be panel specific, probably something like I have done in my fontblock widget (see new update of Srendarr or Azurah).
__________________
@Garkin / EU (CSF guild) / NA (Maelstrom guild)
My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you!, ... (full list)
Updated, modified and test addon versions are in my DROPBOX folder.
Garkin is offline Report comment to moderator  
Reply With Quote
Unread 02/13/15, 12:31 PM  
votan
 
votan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 66
File comments: 80
Uploads: 6
Re: Dropdown

Originally Posted by Garkin
When dropdown widget is updated comboboxCount is reset back to 1. Usually it doesn't matter, but if you are creating controls directly (and you don't have any other option if you want to modify created controls), some comboboxes could already exist and then you will get an UI error because of duplicate cotrol names.
I see, but how preventing this? Would you agree to:
Lua Code:
  1. LAMCreateControl.comboboxCount = LAMCreateControl.comboboxCount or 1
  2. function LAMCreateControl.dropdown(parent, dropdownData, controlName)
  3.     // ...
  4.  
  5.     local comboboxCount = LAMCreateControl.comboboxCount
  6.     control.combobox = wm:CreateControlFromVirtual(parent:GetName().."Combobox"..comboboxCount, control, "ZO_ComboBox")
  7.     comboboxCount = comboboxCount + 1
  8.     LAMCreateControl.comboboxCount = comboboxCount
  9.     // ...
  10. end

Beside that:
I integrated the other fixes in my version and they work well. No half width glitches, no dropdown errors.
__________________
@votan73 (EU - megaserver)
votan is online now Report comment to moderator  
Reply With Quote
Unread 02/13/15, 08:34 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 761
File comments: 996
Uploads: 32
Half width controls

I'm creating custom widgets for Azurah & Srendarr settings menu. I found out that all widgets which are half width have height set to 55. Can you add support for another sizes? It is too small for my fontblock.

Something like this:
Lua Code:
  1. local function CreateOptionsControls(panel)
  2.     local addonID = panel:GetName()
  3.     local optionsTable = addonToOptionsMap[addonID]
  4.    
  5.     if optionsTable then
  6.         local lastAddedControl, lacAtHalfRow
  7.         local anchorOffset = 0
  8.         for _, widgetData in ipairs(optionsTable) do
  9.             local widgetType = widgetData.type
  10.             if widgetType == "submenu" then
  11.                 local submenu = LAMCreateControl[widgetType](panel, widgetData)
  12.                 if lastAddedControl then
  13.                     submenu:SetAnchor(TOPLEFT, lastAddedControl, BOTTOMLEFT, 0, 15 + anchorOffset)
  14.                 else
  15.                     submenu:SetAnchor(TOPLEFT)
  16.                 end
  17.                 lastAddedControl = submenu
  18.                 lacAtHalfRow = false
  19.  
  20.                 local lastAddedControlSub, lacAtHalfRowSub
  21.                 local anchorOffsetSub = 0
  22.                 for _, subWidgetData in ipairs(widgetData.controls) do
  23.                     local subWidgetType = subWidgetData.type
  24.                     local subWidget = LAMCreateControl[subWidgetType](submenu, subWidgetData)
  25.                     local isHalf = subWidgetData.width == "half"
  26.                     if lastAddedControlSub then
  27.                         if lacAtHalfRowSub and isHalf then
  28.                             subWidget:SetAnchor(TOPLEFT, lastAddedControlSub, TOPRIGHT, 5, 0)
  29.                             lacAtHalfRowSub = false
  30.                             anchorOffsetSub = zo_max(0, subWidget:GetHeight() - lastAddedControlSub:GetHeight())
  31.                         else
  32.                             subWidget:SetAnchor(TOPLEFT, lastAddedControlSub, BOTTOMLEFT, 0, 15 + anchorOffsetSub)
  33.                             lacAtHalfRowSub = isHalf
  34.                             anchorOffsetSub = 0
  35.                             lastAddedControlSub = subWidget
  36.                         end
  37.                     else
  38.                         subWidget:SetAnchor(TOPLEFT)
  39.                         lacAtHalfRowSub = isHalf
  40.                         lastAddedControlSub = subWidget
  41.                     end
  42.                 end
  43.             else
  44.                 local widget = LAMCreateControl[widgetType](panel, widgetData)
  45.                 local isHalf = widgetData.width == "half"
  46.                 if lastAddedControl then
  47.                     if lacAtHalfRow and isHalf then
  48.                         widget:SetAnchor(TOPLEFT, lastAddedControl, TOPRIGHT, 10, 0)
  49.                         anchorOffset = zo_max(0, widget:GetHeight() - lastAddedControl:GetHeight())
  50.                         lacAtHalfRow = false
  51.                     else
  52.                         widget:SetAnchor(TOPLEFT, lastAddedControl, BOTTOMLEFT, 0, 15 + anchorOffset)
  53.                         lacAtHalfRow = isHalf
  54.                         anchorOffset = 0
  55.                         lastAddedControl = widget
  56.                     end
  57.                 else
  58.                     widget:SetAnchor(TOPLEFT)
  59.                     lacAtHalfRow = isHalf
  60.                     lastAddedControl = widget
  61.                 end
  62.             end
  63.         end
  64.     end
  65.  
  66.     optionsCreated[addonID] = true
  67.     cm:FireCallbacks("LAM-PanelControlsCreated", panel)
  68. end
__________________
@Garkin / EU (CSF guild) / NA (Maelstrom guild)
My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you!, ... (full list)
Updated, modified and test addon versions are in my DROPBOX folder.
Garkin is offline Report comment to moderator  
Reply With Quote
Unread 02/10/15, 10:07 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 761
File comments: 996
Uploads: 32
Dropdown

When dropdown widget is updated comboboxCount is reset back to 1. Usually it doesn't matter, but if you are creating controls directly (and you don't have any other option if you want to modify created controls), some comboboxes could already exist and then you will get an UI error because of duplicate cotrol names.

What I mean by creating controls directly:
Lua Code:
  1. local control = LAMCreateControl[widgetType](panel, widgetData, widgetName)
(see LibAddonMenu-2.0 Docs)

And a typo in the dropdown.lua:
Lua Code:
  1. local function DropdownCallback(choice, choiceText, choice)
  2.     choice.control:UpdateValue(false, choiceText)
  3. end
As you can see there is 2 times used variable choice. First should be self, combobox or anything else, you don't use it anyway.
__________________
@Garkin / EU (CSF guild) / NA (Maelstrom guild)
My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you!, ... (full list)
Updated, modified and test addon versions are in my DROPBOX folder.
Last edited by Garkin : 02/10/15 at 10:36 AM.
Garkin is offline Report comment to moderator  
Reply With Quote
Unread 02/04/15, 12:59 PM  
votan
 
votan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 66
File comments: 80
Uploads: 6
New UI

If it is time for a new revision, it is may also time for a refresh of the UI?

Does someone hate it? Does someone like it? write comment here

It's based on the dropbox version of Ayantir.
It is just some change to the main file: Making borders invisible, changing base class of the buttons, a bit wider....
Shall I continue and provide source code or should I go away?

By the way r17 works (with a downgrade) in live, too.
__________________
@votan73 (EU - megaserver)
Last edited by votan : 02/04/15 at 01:44 PM.
votan is online now Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: