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: | 36,684 |
Total downloads: | 5,009,539 |
Favorites: | 2,826 |
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 |
Seerah |
View Public Profile |
Send a private message to Seerah |
Find More Posts by Seerah |
Add Seerah to Your Buddy List |
10/31/14, 03:15 AM | |
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 |
View Public Profile |
Send a private message to Ayantir |
Visit Ayantir's homepage! |
Find More Posts by Ayantir |
Add Ayantir to Your Buddy List |
10/21/14, 04:24 PM | |||
Re: lam:OpenToPanel / update 5
http://www.esoui.com/portal.php?id=5...&featureid=536 |
|||
|
Garkin |
View Public Profile |
Send a private message to Garkin |
Send email to Garkin |
Visit Garkin's homepage! |
Find More Posts by Garkin |
Add Garkin to Your Buddy List |
10/21/14, 03:50 PM | |
|
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 |
View Public Profile |
Send a private message to Criscal |
Send email to Criscal |
Visit Criscal's homepage! |
Find More Posts by Criscal |
Add Criscal to Your Buddy List |
10/16/14, 06:45 AM | ||
Re: Re: PTS Server patch
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 Code:
- button.tooltipText = buttonData.tooltip + button.data = { tooltipText = buttonData.tooltipText } Code:
- control.tooltipText = colorpickerData.tooltip Code:
- control.tooltipText = dropdownData.tooltip Code:
- control.tooltipText = editboxData.tooltip Code:
- control.tooltipText = checkboxData.tooltip Code:
- control.tooltipText = sliderData.tooltip 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 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
Last edited by Garkin : 10/16/14 at 06:58 AM.
|
||
|
Garkin |
View Public Profile |
Send a private message to Garkin |
Send email to Garkin |
Visit Garkin's homepage! |
Find More Posts by Garkin |
Add Garkin to Your Buddy List |
10/16/14, 02:00 AM | |
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 |
View Public Profile |
Send a private message to Fyrakin |
Send email to Fyrakin |
Visit Fyrakin's homepage! |
Find More Posts by Fyrakin |
Add Fyrakin to Your Buddy List |
10/15/14, 06:20 PM | ||
PTS Server patch
The following changes worked for me. I tested it on both 100009 and 100010 (PTS) api versions. At the top add: Code:
local apiVersion = 100009 Code:
local function InitApiVer() if KEYBOARD_OPTIONS then apiVersion = 100010 end end --INITIALIZING InitApiVer() ... Code:
ZO_GameMenu_InGame.gameMenu.headerControls[locSettings]:SetOpen(true) SCENE_MANAGER:AddFragment(OPTIONS_WINDOW_FRAGMENT) + if apiVersion < 100010 then ZO_OptionsWindow_ChangePanels(lam.panelID) + else + KEYBOARD_OPTIONS:ChangePanels(lam.panelID) + end if not lam.panelSubCategoryControl then lam.panelSubCategoryControl = _G["ZO_GameMenu_InGameNavigationContainerScrollChildZO_GameMenu_SubCategory"..(lam.panelID + 1)] end + if apiVersion < 100010 then ZO_TreeEntry_OnMouseUp(lam.panelSubCategoryControl, true) + end panel:SetHidden(false) Code:
ZO_OptionsWindow_AddUserPanel(controlPanelID, controlPanelNames[GetCVar("Language.2")] or controlPanelName["en"]) lam.panelID = _G[controlPanelID] + if apiVersion < 100010 then ZO_PreHook("ZO_OptionsWindow_ChangePanels", HandlePanelSwitching) + else + ZO_PreHook(ZO_SharedOptions, "ZO_OptionsWindow_ChangePanels", HandlePanelSwitching) + end LAMSettingsPanelCreated = true Code:
list.controlType = OPTIONS_CUSTOM list.panel = lam.panelID + if apiVersion < 100010 then ZO_OptionsWindow_InitializeControl(list) + else + list.data = {} + list.data.controlType = OPTIONS_CUSTOM + list.data.panel = lam.panelID + KEYBOARD_OPTIONS:InitializeControl(list) + end |
||
|
neonatura |
View Public Profile |
Send a private message to neonatura |
Send email to neonatura |
Visit neonatura's homepage! |
Find More Posts by neonatura |
Add neonatura to Your Buddy List |
10/14/14, 07:29 PM | |
|
Thanks, guys!
|
|
Seerah |
View Public Profile |
Send a private message to Seerah |
Send email to Seerah |
Visit Seerah's homepage! |
Find More Posts by Seerah |
Add Seerah to Your Buddy List |
10/14/14, 08:58 AM | ||
|
||
|
Randactyl |
View Public Profile |
Send a private message to Randactyl |
Send email to Randactyl |
Visit Randactyl's homepage! |
Find More Posts by Randactyl |
Add Randactyl to Your Buddy List |
10/14/14, 05:36 AM | |||
I wonder what will happen when gamepad options will be available. My guess is that there will be one common function (such as ZO_OptionsWindow_InitializeControl) which will check if IsInGamepadPreferredMode() and then call InitializeControl method of keyboard or gamepad options. |
|||
|
Garkin |
View Public Profile |
Send a private message to Garkin |
Send email to Garkin |
Visit Garkin's homepage! |
Find More Posts by Garkin |
Add Garkin to Your Buddy List |
10/14/14, 01:18 AM | ||
Also, ZO_OptionsWindow_InitializeControl seems to be depreciated. Might as well change line 301 from Lua Code:
Lua Code:
|
||
|
Randactyl |
View Public Profile |
Send a private message to Randactyl |
Send email to Randactyl |
Visit Randactyl's homepage! |
Find More Posts by Randactyl |
Add Randactyl to Your Buddy List |
10/13/14, 08:03 PM | ||
Change lines 297 and 298 in LibAddonMenu-2.0.lua: Lua Code:
Lua Code:
It is untested as I'm currently not able login to the PTS (I'm not getting email with access code ) 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:
Lua Code:
line 200 from: Lua Code:
Lua Code:
And line 234 from: Lua Code:
Lua Code:
Last edited by Garkin : 10/16/14 at 05:38 PM.
|
||
|
Garkin |
View Public Profile |
Send a private message to Garkin |
Send email to Garkin |
Visit Garkin's homepage! |
Find More Posts by Garkin |
Add Garkin to Your Buddy List |
10/13/14, 07:09 PM | |
Seems like this might need an update for 1.5 now live on the PTS
Lua Code:
Thanks for all your hard work on this lib! |
|
|
Atropos |
View Public Profile |
Send a private message to Atropos |
Send email to Atropos |
Visit Atropos's homepage! |
Find More Posts by Atropos |
Add Atropos to Your Buddy List |
08/02/14, 07:09 AM | ||
Lua Code:
|
||
|
Garkin |
View Public Profile |
Send a private message to Garkin |
Send email to Garkin |
Visit Garkin's homepage! |
Find More Posts by Garkin |
Add Garkin to Your Buddy List |
08/02/14, 06:12 AM | |
Forum posts: 2
File comments: 51
Uploads: 0
|
Documentation for the "default" parameter for the colorpicker widget is wrong in the controls\colorpicker.lua
In the lua file Lua Code:
But here on the web its Lua Code:
Only the variant described here on the web works. (Which is a pain imho, since it's makes for a much more complicated code on my side ) By just adding a few lines to the controls\colorpicker.lua both variants can be supported. Lua Code:
Last edited by wmrojer : 08/02/14 at 06:19 AM.
|
|
wmrojer |
View Public Profile |
Send a private message to wmrojer |
Send email to wmrojer |
Visit wmrojer's homepage! |
Find More Posts by wmrojer |
Add wmrojer to Your Buddy List |