Go to Page... |
Compatibility: | Gold Road (10.0.0) |
Updated: | 06/03/24 01:19 PM |
Created: | 02/14/14 10:28 PM |
Monthly downloads: | 48,449 |
Total downloads: | 4,966,997 |
Favorites: | 2,812 |
MD5: |
IMPORTANT In case you get an error that contains text like this: user:/AddOns/<some other addon>/Libs/LibAddonMenu-2.0 Some other addon you have installed likely contains an old version of LibAddonMenu which is loaded before the most current one. Make sure to search for LibAddonMenu-2.0 folders in your AddOns folder and delete all of them. Afterwards install the latest version of LibAddonMenu-2.0 separately. Check Kyzderp's guide for more detailed instructions |
## DependsOn: LibAddonMenu-2.0
## DependsOn: LibAddonMenu-2.0>=30
local LAM = LibAddonMenu2 local saveData = {} -- TODO this should be a reference to your actual saved variables table local panelName = "MyAddOnSettingsPanel" -- TODO the name will be used to create a global variable, pick something unique or you may overwrite an existing variable! local panelData = { type = "panel", name = "MyAddOn Settings", author = "me", } local panel = LAM:RegisterAddonPanel(panelName, panelData) local optionsData = { { type = "checkbox", name = "My First Checkbox", getFunc = function() return saveData.myValue end, setFunc = function(value) saveData.myValue = value end } } LAM:RegisterOptionControls(panelName, optionsData)
- use the callbacks "LAM-PanelControlsCreated", "LAM-PanelOpened" and "LAM-PanelClosed" instead- updated Brazilian translation (thanks FelipeS11)
- the panel control is returned by RegisterAddonPanel- added "translation", "feedback" and "donation" properties to panel (#88, thanks Baertram)
- all three (and also the "website" property) accept a function or a string- added "disabled" and "disabledLabel" property for submenus (#86, #90, thanks klingo)
- the function receives the value, min and max as arguments and has to return a clamped value- added optional support for LibDebugLogger
- in case it is loaded, it logs the full error when control creation failed- updated LibStub to r5
- when set to true it changes the text color of the button to red and opens a dialog which shows the label and the warning text before running the callback- added new options for sliders and fixed some bugs (#49)
- autoSelect (boolean): when set to true it makes the input field select all text when it gains focus- for other internal code changes take a look at the git history
- inputLocation (string): setting it to "right" will move the input field to the right side of the slider and make it slightly bigger. For aesthetic reasons this should only be used in custom panels and not in the addon menu
- clampInput (boolean): true by default and if set to false it allows the input values of the slider to exceed the min and max value
- NOTE: the menu is now a bit wider than before, if you created custom elements you might need to update them accordingly- added search box to addon list (thanks votan & merlight)
File Name |
Version |
Size |
Uploader |
Date |
2.0 r36 |
49kB |
sirinsidiator |
03/10/24 04:21 PM |
|
2.0 r35 |
49kB |
sirinsidiator |
10/31/23 01:16 PM |
|
2.0 r34 |
48kB |
sirinsidiator |
06/06/22 05:35 AM |
|
2.0 r33 |
48kB |
sirinsidiator |
03/14/22 02:51 PM |
|
2.0 r32 |
48kB |
sirinsidiator |
12/17/20 02:04 PM |
|
2.0 r31 |
49kB |
sirinsidiator |
06/21/20 03:06 PM |
|
2.0 r30 |
48kB |
sirinsidiator |
10/21/19 03:23 AM |
|
2.0 r29 |
48kB |
sirinsidiator |
05/07/19 11:00 AM |
|
2.0 r28 |
47kB |
sirinsidiator |
05/01/19 09:33 AM |
|
2.0 r27 |
47kB |
sirinsidiator |
04/18/19 03:07 PM |
|
2.0 r26 |
45kB |
sirinsidiator |
05/21/18 02:36 AM |
|
2.0 r25 |
45kB |
sirinsidiator |
09/29/17 12:28 PM |
|
2.0 r24 |
45kB |
sirinsidiator |
07/14/17 01:00 PM |
|
2.0 r23 |
42kB |
sirinsidiator |
10/30/16 10:00 AM |
|
2.0 r22 |
39kB |
sirinsidiator |
08/06/16 07:42 AM |
|
2.0 r21 |
38kB |
sirinsidiator |
07/17/16 11:04 AM |
|
2.0 r20 |
41kB |
sirinsidiator |
03/26/16 10:45 AM |
|
2.0 r19 |
37kB |
sirinsidiator |
02/24/16 12:24 PM |
|
2.0 r18 |
36kB |
sirinsidiator |
06/14/15 01:12 PM |
|
2.0 r17 |
30kB |
sirinsidiator |
02/22/15 11:09 AM |
|
2.0 r16 |
27kB |
Seerah |
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 |
![]() |
Comment Options |
max4342 |
View Public Profile |
Send a private message to max4342 |
Find More Posts by max4342 |
Add max4342 to Your Buddy List |
g0thicicecream |
View Public Profile |
Send a private message to g0thicicecream |
Find More Posts by g0thicicecream |
Add g0thicicecream to Your Buddy List |
IsJustaGhost |
View Public Profile |
Send a private message to IsJustaGhost |
Find More Posts by IsJustaGhost |
Add IsJustaGhost to Your Buddy List |
![]() |
|
|
did "choicesTooltips" for dropdowns change? It stopped working in my addon.
|
![]() |
![]() |
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
![]() |
|
|
LAM2 drop-down choices tooltips not working
Hello. I have noticed that the dropdown choices tooltips have stopped working.
This happened due to a change in addoncompatibilityaliases.lua around ESOUI V9.3.3. Lua Code:
Therefore, we should make a small change to the SetupTooltips function in dropdown.lua so that the necessary hooks are added correctly. like this... Lua Code:
You may have already noticed this problem. My bad. I am lazy to make a pull request. ![]() - Calamath |
![]() |
![]() |
Calamath |
View Public Profile |
Send a private message to Calamath |
Send email to Calamath |
Find More Posts by Calamath |
Add Calamath to Your Buddy List |
![]() |
|||
|
Re: Re: Re: Re: LAM2 limit on optionsData's controls[]?
Along the way, I discovered another addon (AwesomeInfo) had an embedded (and outdated?) version of LibAddonMenu. Disabling that addon further resolved issues (this wasn't a root cause, I had disabled all other addons previously and the original problem persisted.) However, removing their embedded addon didn't work (and broke their addon) and besides, I'd rather not go poking around someone else's addon space. As memory serves, there is a way to specify a specific version of LAM2? A variation on the OptionalDependsOn entry maybe that would ensure FarmersToolkit only used your version? Thank you for your help in this and again, apologies for the delayed response. -V |
||
![]() |
![]() |
Vilkasmanga |
View Public Profile |
Send a private message to Vilkasmanga |
Send email to Vilkasmanga |
Find More Posts by Vilkasmanga |
Add Vilkasmanga to Your Buddy List |
![]() |
||
Re: Re: Re: LAM2 limit on optionsData's controls[]?
I was able to generate a submenu with 111 checkboxes with no issues: Lua Code:
|
||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|||
|
Re: Re: LAM2 limit on optionsData's controls[]?
I put the new code in, no change however. I have confirmed that the new code is being invoked (versus having some rogue version in someone else's Addon). Also, the actual count of the loop is 61 (added to my code to print the count, runs from 1 to 111 but only shows 1-61) -V |
||
![]() |
![]() |
Vilkasmanga |
View Public Profile |
Send a private message to Vilkasmanga |
Send email to Vilkasmanga |
Find More Posts by Vilkasmanga |
Add Vilkasmanga to Your Buddy List |
![]() |
||
Re: LAM2 limit on optionsData's controls[]?
Could you please try replacing that function with the following code and see if it fixes the issue for you? Lua Code:
|
||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|
|
LAM2 limit on optionsData's controls[]?
Standard caveat: First time add-on developer, new to lua, steep learning curve, etc. but also, I've looked for answers and pored through the documentation - I am asking for insight and advice here. Also, if this isn't the right place to ask this question, apologies given / redirects welcome.
Problem: When trying to make a config box for choosing pets (to mark them as favorites), using LAM2, the config window tops out at 60/61 entries. The full table has 111 and I can loop all the way through it, but the same code that works for the first 59 silently fails (i.e., without error message that I can see) at 60. My current work-around is to start up another config box which is fine but cumbersome, especially for people with LOTS of pets. Perhaps I am building the options submenu in an incorrect fashion but I needed to build it programmatically so the current approach is to build out the optionsData framework: Code:
optionsData[4] = { type= "submenu", name=string.format("|c00FF00 Favorite Pets|r 1-50"), tooltip="Choose which pets (favorites) that can be used for random swaps. (Optional)", controls = {}, -- XYZZY -- } The actual code looks more or less like this (that is, there is more code in the actual working set but it involves incrementing ODCount and resetting loop2 to support a new block of optionsData. Ugly hack but it works, I hope it is not relevant for this question since the problem predates that solution. For this example, I've set ODCount and loop2 the way it would be needed for this example. Also, I'm copy/pasting from the actual code so forgive/ignore formatting/typos/etc. The logic and approach are the intended message here.): Code:
-- This table is set up as SortedPetNames[name]=[#Pet number] local ODCount = 4 local loop2 = 0 for key,val in orderedPairs(FarmersToolkit.SortedPetNames) do loop2 =loop2 + 1; local PetName = GetCollectibleLink(val, 1) optionsData[ODCount].controls[loop2] = { type = "checkbox", name = PetName, tooltip = "Marking ON means: set " .. PetName .. " as a favorite random pet ", getFunc = function() return FT_LAM.GetFPetValue(val) end, setFunc = function(value) FT_LAM.SetFPetValue(val,value) end, } end So, my question: Is there a unknown-to-me limit in OptionsData[X].controls around 60 or 61? Or is my code just so ugly that lua is saving humanity from ever seeing the actual results ![]() Thanks in advance, -V
Last edited by Vilkasmanga : 02/27/24 at 07:54 AM.
|
![]() |
![]() |
Vilkasmanga |
View Public Profile |
Send a private message to Vilkasmanga |
Send email to Vilkasmanga |
Find More Posts by Vilkasmanga |
Add Vilkasmanga to Your Buddy List |
![]() |
|
Forum posts: 0
File comments: 11
Uploads: 0
|
Help?
I got this error message today. And I'm not missing the library [LibMediaProvider-1.0] it's saying it can't find (even reinstalled it, just in case), so I'm not really sure where to go with this? Anything with a reference to LibAddonMenu-2.0 is being affected, and WILL NOT WORK.
user:/AddOns/BugEater/BugEater.lua:11: Cannot find a library instance of "LibMediaProvider-1.0". stack traceback: user:/AddOns/LibAddonMenu-2.0/LibStub/LibStub.lua:29: in function 'LibStub:GetLibrary' user:/AddOns/BugEater/BugEater.lua:11: in function '(main chunk)' |
![]() |
![]() |
TernieLaBiscuit |
View Public Profile |
Send a private message to TernieLaBiscuit |
Send email to TernieLaBiscuit |
Find More Posts by TernieLaBiscuit |
Add TernieLaBiscuit to Your Buddy List |
![]() |
|||
|
Re: Re: LibAddonMenu - Downdown on PTS (Update 41 -Version 9.3)
|
||
![]() |
![]() |
Anthonysc |
View Public Profile |
Send a private message to Anthonysc |
Send email to Anthonysc |
Find More Posts by Anthonysc |
Add Anthonysc to Your Buddy List |
![]() |
||
Re: LibAddonMenu - Downdown on PTS (Update 41 -Version 9.3)
ZOS is planning some more adjustments in one of the next pts patches, so I haven't finalized it yet. |
||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|
LibAddonMenu - Downdown on PTS (Update 41 -Version 9.3)
Hi there !
It seems some past workaround has been fixed on PTS, and the line on dropdown.lua:396 is not needed anymore: Code:
-- dropdown.m_dropdown:SetParent(combobox:GetOwningWindow()) -- TODO remove workaround once the problem is fixed in the game (As for now on PTS, it fails with `dropdown.lua:396: attempt to index a nil value` ) |
|
![]() |
![]() |
Mouton |
View Public Profile |
Send a private message to Mouton |
Send email to Mouton |
Find More Posts by Mouton |
Add Mouton to Your Buddy List |
![]() |
|
Forum posts: 0
File comments: 10
Uploads: 0
|
bug messge
since todays server maintanance none of my addons work that need LibAddonMenu2
error text: user:/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:1001: function expected instead of nil stack traceback: user:/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:1001: in function 'lam:RegisterAddonPanel' <Locals> self = [table:1]{panelId = 100}, addonID = "QuestMap_Options", panelData = [table:2]{name = "Quest Map", registerForDefaults = T, registerForRefresh = T, version = "3.16", displayName = "|c70C0DEQuest Map|r", slashCommand = "/questmap", author = "|c70C0DECaptainBlagbird|r, |cf...", type = "panel"}, container = ud </Locals> user:/AddOns/QuestMap/Settings.lua:632: in function 'OnPlayerActivated' <Locals> event = 589824, LAM = [table:1] </Locals> I get 37 pages all like this one |
![]() |
![]() |
billi |
View Public Profile |
Send a private message to billi |
Send email to billi |
Find More Posts by billi |
Add billi to Your Buddy List |
![]() |