Quantcast
Download
(45 Kb)
Download
Updated: 09/29/17 12:28 PM
Pictures
File Info
Compatibility:
Clockwork City (3.2)
Horns of the Reach (3.1)
Updated:09/29/17 12:28 PM
Created:02/14/14 10:28 PM
Monthly downloads:1,609
Total downloads:60,733
Favorites:222
MD5:
3.2
LibAddonMenu  Popular! (More than 5000 hits)
Version: 2.0 r25
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
libs\LibAddonMenu-2.0\controls\iconpicker.lua
libs\LibAddonMenu-2.0\controls\divider.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 r25
- fixed tooltips not working for entries in scrollable dropdown controls (#78, thanks kyoma)
- fixed standalone LAM not loading as expected when LAM is bundled with the manifest included (#81)
- fixed slashcommands not opening the correct panel on first attempt after UI load (#79)
- fixed an error when opening the addon settings menu after Clockwork City update (#80, thanks Gandalf)

2.0 r24
- added scrollable property for dropdown controls (#71, #75, thanks kyoma)
- added Italian translation (#70, thanks JohnnyKing94)
- added Polish translation (#73, #74, thanks EmiruTegryfon)
- updated Spanish translation (thanks TERAB1T)
- updated Russian translation (thanks Morganlefai and Kwisatz)
- fixed debug code not accepting functions for widget names (#72, thanks kyoma)

2.0 r23
- added Chinese translation (#64, thanks bssthu)
- added tooltips for dropdown menu entries (#42)
- added support for separate values for dropdown menu entries (#65)
- added keybind for reset to defaults button (#68)
- added requireReload property for input controls (#47)
- fixed support for nested submenus (#61, thanks Baertram)
- fixed alpha and height not working on divider control (#69)

2.0 r22
- fixed mouse exit events for sliders and textures (#52, thanks silvereyes333)
- fixed decimal input on sliders (#54)
- fixed icon picker not retaining color when disabled is toggled (#58)
- fixed slider accepting mouse wheel input while being disabled (#60)
- added support for nested submenus (#53)
- added new divider widget (#56, thanks silvereyes333)
- added new function "UpdateWarning" to controls which allows to refresh the warning text (#55, thanks silvereyes333)
- added new property "website" to panels which will render a button in the panel to open the specified addon URL (#57)
- updated localization (#59, thanks everyone who helped with it)

2.0 r21
- fixed panel creation starting more than once when switching between different addon panels quickly (#40)
- fixed LAM.util getting wiped with each version load causing errors for many players (#44)
- fixed disabled controls not having the correct label color in some cases (#41)
- fixed controls not updating their own disabled state when their value changes (#51)
- added Japanese translation (thanks k0ta0uchi) (#45)
- added isDangerous flag for button controls (#50)
- 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
- 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
- for other internal code changes take a look at the git history

2.0 r20
- fixed empty panels not firing LAM-PanelControlsCreated (#32)
- removed height constraint of 2500 from submenus (#34)
- added two new callbacks LAM-PanelOpened and LAM-PanelClosed. Both pass the panel as their sole argument (#27)
- 'default' can now be a function in addition to a static value (#23)
- all labels (name, tooltip, warning, etc.) can now be a string id or function in addition to a static string (#22)
- updated LibStub to r4

2.0 r19
- made icon picker choicesTooltips array optional
- added support for custom panel objects without a GetWidth method (partially fixes #26)
- fixed controls not refreshing correctly when they are initialized with a boolean "false" on the disabled property (#35, thanks Randactyl)
- removed height constraint on the description control (#36, thanks KuroiLight)
- added "isExtraWide" property to editboxes, allowing them to utilize more space (#37, thanks KuroiLight)
- added "decimals" property to sliders to allow rounding values to x decimals (#38, implements #21, thanks KuroiLight)
- added mousewheel support for sliders (#39, implements #30, thanks KuroiLight)

2.0 r18
- major overhaul of the addon menu style (thanks votan & merlight)
- 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)
- new icon picker widget
- removed micro freeze when opening a menu with many options for the first time
- changed tooltip property to accept functions that return a string (thanks Ayantir)
- changed the label on the defaults button and menu to avoid a grammar mistake in the french localization (thanks Ayantir)
- updated LibStub to r3 (support for '.' in minor version string, e.g. "17.5")

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 (23)
File Name
Version
Size
Author
Date
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
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 11/19/17, 02:51 AM  
Letho
AddOn Author - Click to view AddOns

Forum posts: 167
File comments: 29
Uploads: 1
Heyhey, could you implement two new functions for iconselect?
- icon padding
- iconselect size

Setting both after creating the iconselect does not work and I just don't manage to find out why. Btw. you could add "AuraMastery" to the addons using LAM section on github, if u like

/edit: Found another feature that would be nice: Colorpicker and iconpicker have a Getfunction that is called upon initialization. The update functions are local functions. In some cases it is neccessary to call the GetFunc in the middle of the game, so a public function that let's us make a preselection would be really handy. Implementing that thing can easily be done by the addon author, but i thought it would probably be nice to include it into the baseline functionality.

Cheers,
Letho
Last edited by Letho : 11/19/17 at 04:29 AM.
Report comment to moderator  
Reply With Quote
Unread 09/29/17, 06:51 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 974
File comments: 593
Uploads: 27
I settled for a variation on your first fix since there is a difference between using the LAM internal ScrollDataIntoView and ZO_ScrollList_ScrollDataIntoView with more than just a handful of addons enabled.
__________________
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 09/26/17, 08:33 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 974
File comments: 593
Uploads: 27
Thanks. I haven't had the chance to log into PTS yet, but I'll put together an update as soon as I can.
__________________
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 09/23/17, 01:22 PM  
Gandalf
 
Gandalf's Avatar

Forum posts: 0
File comments: 5
Uploads: 0
Update 16 PTS - Breaks LibAddonMenu - better fix

I verified the visual effect of LibAddonMenu's ScrollDataIntoView function with the effect of the standard ZO_ScrollList_ScrollDataIntoView function. I could not find any reason for not using the standard function.

This also drops the need of using ZO internal data structures that break on PTS.

Therefore:
Code:
#524 ScrollDataIntoView(addonList, selectedData)
#602 ScrollDataIntoView(addonList, selectedData)
should be changed to:
Code:
#524 ZO_ScrollList_ScrollDataIntoView(addonList, selectedData.sortIndex)
#602 ZO_ScrollList_ScrollDataIntoView(addonList, selectedData.sortIndex)
and the local function ScrollDataIntoView can be dropped.
Last edited by Gandalf : 09/23/17 at 01:29 PM.
Report comment to moderator  
Reply With Quote
Unread 09/19/17, 06:01 AM  
Gandalf
 
Gandalf's Avatar

Forum posts: 0
File comments: 5
Uploads: 0
Update 16 PTS - Breaks LibAddonMenu - fix

3.2 Source says:

Lua Code:
  1. local function UpdateModeFromHeight(self, height)
  2.     if self.mode == SCROLL_LIST_UNIFORM then
  3.         if self.uniformControlHeight == NO_HEIGHT_SET then
  4.             self.uniformControlHeight = height
  5.         elseif height ~= self.uniformControlHeight then
  6.             self.uniformControlHeight = nil
  7.             self.mode = SCROLL_LIST_NON_UNIFORM
  8.             ZO_ScrollList_Commit(self)
  9.         end
  10.     end
  11. end

Therefore
Code:
#444     local controlHeight = list.controlHeight
should be:
Code:
#444    local controlHeight = list.uniformControlHeight
But to be compatible with update 15 and since it's fixed anyway it might be better:
Code:
#444    local controlHeight = 28

And as for ZM: beauty has its own excuse for being
Last edited by Gandalf : 09/19/17 at 06:15 AM.
Report comment to moderator  
Reply With Quote
Unread 09/19/17, 04:28 AM  
Gandalf
 
Gandalf's Avatar

Forum posts: 0
File comments: 5
Uploads: 0
Update 16 PTS - Breaks LibAddonMenu

Opening Addon Settings cause:

user:/AddOns/SkyShards/Libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:445: operator * is not supported for nil * number
stack traceback:
user:/AddOns/SkyShards/Libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:445: in function 'ScrollDataIntoView'
user:/AddOns/SkyShards/Libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:524: in function 'PopulateAddonList'
user:/AddOns/SkyShards/Libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua:886: in function 'panelData.callback'
EsoUI/Common/ZO_GameMenu/ZO_GameMenu.lua:52: in function 'TreeEntryOnSelected'
EsoUI/Libraries/ZO_Tree/ZO_Tree.lua:568: in function 'ZO_TreeNode:OnSelected'
EsoUI/Libraries/ZO_Tree/ZO_Tree.lua:274: in function 'ZO_Tree:SelectNode'
EsoUI/Libraries/ZO_Tree/ZO_Tree.lua:737: in function 'ZO_TreeEntry_OnMouseUp'
ZO_CollectionsBookContentsCategoriesScrollChildZO_TreeStatusLabelSubCategory1_MouseUp:3: in function '(main chunk)'


It seams that LibAddonMenu can't access addonList.controlHeight of the control ZO_ScrollList anymore.
Report comment to moderator  
Reply With Quote
Unread 09/05/17, 11:02 PM  
rockingdice
 
rockingdice's Avatar
AddOn Author - Click to view AddOns

Forum posts: 10
File comments: 165
Uploads: 9
Originally Posted by rockingdice
I'm testing r24, it seems if I enable the scrollable = true for dropdown control, choicesTooltips are not showing anymore, it's a bug or not supported yet?
for r24, I met this issue once:

Lua Code:
  1. Too many anchors processed. Tail of anchor list:
  2. AC_SUBMENU_CATEGORY_SETTINGCombobox2DropdownScrollScrollBarDown->
  3. AC_SUBMENU_CATEGORY_SETTINGCombobox2DropdownScrollScrollBarUp->
  4. ->
  5. ->
  6. AC_SUBMENU_CATEGORY_SETTINGCombobox2DropdownScrollScrollBarThumbMunge

and a lot of:

Lua Code:
  1. Too many anchors processed. Tail of anchor list:
  2. AC_SUBMENU_CATEGORY_SETTINGCombobox2DropdownScroll1Row4->
  3. AC_SUBMENU_CATEGORY_SETTINGCombobox2DropdownScroll1Row4ScrollHighlightAnimation->
  4. AC_SUBMENU_CATEGORY_SETTINGCombobox2DropdownScroll1Row5->
  5. AC_SUBMENU_CATEGORY_SETTINGCombobox2DropdownScroll1Row5ScrollHighlightAnimation->
  6. AC_SUBMENU_CATEGORY_SETTINGCombobox2DropdownScroll1Row6

when I try to open a scrollazble dropdown. It has 10~ items.

And it pops up a really wide dropdownlist.

screenshot:
Last edited by rockingdice : 09/06/17 at 10:32 AM.
Report comment to moderator  
Reply With Quote
Unread 09/05/17, 11:45 AM  
rockingdice
 
rockingdice's Avatar
AddOn Author - Click to view AddOns

Forum posts: 10
File comments: 165
Uploads: 9
I'm testing r24, it seems if I enable the scrollable = true for dropdown control, choicesTooltips are not showing anymore, it's a bug or not supported yet?
Report comment to moderator  
Reply With Quote
Unread 09/05/17, 11:35 AM  
rockingdice
 
rockingdice's Avatar
AddOn Author - Click to view AddOns

Forum posts: 10
File comments: 165
Uploads: 9
Originally Posted by sirinsidiator
Originally Posted by CrazyDutchGuy
is r24 ready to be released, i am depending on it for the polish translations.
Since nobody reported any problems I went ahead and uploaded it. Feel free to push your addon. The file is the same as in last weeks thread.
Hi, I found a bug from old version (r23), which may cause performance issue.

I'm using dropdown control to show dynamic items. I'm using dropdownCtrl:UpdateChoices(...) function to update its content(Seems the only way to do it), like:

Lua Code:
  1. local dropdownCtrl = WINDOW_MANAGER:GetControlByName(name, "")
  2. local data = dropdownData[name]
  3. dropdownCtrl:UpdateChoices(data.choices, data.choicesValues, data.choicesTooltips)

It's very simple, just pass in new table to replace the content for showing.
But it will become slower (FPS drops from 60 to 1x) when you click on the dropdown control after you try to use this function several times.

I found that if I remove the tooltips data, kinda hack it: (or will be asserted due to choices ~= choicesTooltips):
Lua Code:
  1. --dropdownCtrl:UpdateChoices(data.choices, data.choicesValues, data.choicesTooltips)
  2. dropdownCtrl.data.choicesTooltips = nil
  3. dropdownCtrl:UpdateChoices(data.choices, data.choicesValues)

Then everything goes fine.

From the code, I doubt there's something wrong with SetupTooltips function, but not sure of it. Or it's not going to use UpdateChoices like this way? Any other way to update the dropdown data?

Currently I have to disable tooltips to avoid this issue.
Report comment to moderator  
Reply With Quote
Unread 07/14/17, 01:01 PM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 974
File comments: 593
Uploads: 27
Originally Posted by CrazyDutchGuy
is r24 ready to be released, i am depending on it for the polish translations.
Since nobody reported any problems I went ahead and uploaded it. Feel free to push your addon. The file is the same as in last weeks thread.
__________________
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 07/14/17, 06:15 AM  
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view AddOns

Forum posts: 88
File comments: 302
Uploads: 9
is r24 ready to be released, i am depending on it for the polish translations.
__________________
Your Crazy Dutch Addon Developer : ATLAS - Lost Treasure - Show Loot - Bank Stack - ATLAS Boss Logger

Donations : paypal
Last edited by CrazyDutchGuy : 07/14/17 at 06:15 AM.
Report comment to moderator  
Reply With Quote
Unread 05/29/17, 03:05 PM  
Hozec
AddOn Author - Click to view AddOns

Forum posts: 11
File comments: 13
Uploads: 1
Re: Re: Issue with values not updating

Originally Posted by Ayantir
Originally Posted by Hozec
Hey, so i noticed that if I go into the menu change some setting it shows right away and all of that works good. However if i close out of the settings and use a keybind to change a setting (let's say visibility of an ui element) and I go back to the add on settings and it takes me straight to my settings page the value isn't gotten again until you click away from that settings menu and go back.

I hope that wasn't very confusing.

Steps:
1. Go to Settings > Addons.
2. Find an addon that has a setting that you can also toggle via keybind
3. Exit settings (don't have to change any setting from step 2)
4. Use the keybind toggle to change the setting you found in step 2
5. Go to Settings > Addons (It should take you back into the last addon settings page you were in.)
6. Value of the setting you just changed via keybind toggle isn't updated.

Not really sure if it is me or the library. I do have
registerForRefresh = true,
registerForDefaults = true,

Lua Code:
  1. panel = LAM2:RegisterAddonPanel(ADDON_NAME .. "LAM2Options", panelData)
  2.  
  3. CALLBACK_MANAGER:FireCallbacks("LAM-RefreshPanel", panel)
Thanks! but I tried as you suggested and it didn't work.

Lua Code:
  1. local LAM2 = LibStub:GetLibrary("LibAddonMenu-2.0")
  2. function championUI.CreateSettingsWindow()
  3. local panelData = {
  4.     type = "panel",
  5.     name = "Champion UI",
  6.     displayName = "Champion UI",
  7.     author = championUI.author,
  8.     version = championUI.version,
  9.     --slashCommand = "",
  10.     registerForRefresh = true,
  11.     registerForDefaults = true,
  12. }
  13.  
  14. local optionsData = {
  15. }
  16.  
  17.  panel = LAM2:RegisterAddonPanel("champion_ui", panelData)
  18.  LAM2:RegisterOptionControls("champion_ui", optionsData)
  19.  CALLBACK_MANAGER:FireCallbacks("LAM-RefreshPanel", panel)
  20. end
Last edited by Hozec : 05/29/17 at 03:13 PM.
Report comment to moderator  
Reply With Quote
Unread 05/29/17, 02:55 PM  
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view AddOns

Forum posts: 995
File comments: 1532
Uploads: 31
Re: Issue with values not updating

Originally Posted by Hozec
Hey, so i noticed that if I go into the menu change some setting it shows right away and all of that works good. However if i close out of the settings and use a keybind to change a setting (let's say visibility of an ui element) and I go back to the add on settings and it takes me straight to my settings page the value isn't gotten again until you click away from that settings menu and go back.

I hope that wasn't very confusing.

Steps:
1. Go to Settings > Addons.
2. Find an addon that has a setting that you can also toggle via keybind
3. Exit settings (don't have to change any setting from step 2)
4. Use the keybind toggle to change the setting you found in step 2
5. Go to Settings > Addons (It should take you back into the last addon settings page you were in.)
6. Value of the setting you just changed via keybind toggle isn't updated.

Not really sure if it is me or the library. I do have
registerForRefresh = true,
registerForDefaults = true,

Lua Code:
  1. panel = LAM2:RegisterAddonPanel(ADDON_NAME .. "LAM2Options", panelData)
  2.  
  3. CALLBACK_MANAGER:FireCallbacks("LAM-RefreshPanel", panel)
__________________
Obsessive Compulsive Coder

My little french Guild: Cercle de l'Eveil
Report comment to moderator  
Reply With Quote
Unread 05/29/17, 02:31 PM  
Hozec
AddOn Author - Click to view AddOns

Forum posts: 11
File comments: 13
Uploads: 1
Issue with values not updating

Hey, so i noticed that if I go into the menu change some setting it shows right away and all of that works good. However if i close out of the settings and use a keybind to change a setting (let's say visibility of an ui element) and I go back to the add on settings and it takes me straight to my settings page the value isn't gotten again until you click away from that settings menu and go back.

I hope that wasn't very confusing.

Steps:
1. Go to Settings > Addons.
2. Find an addon that has a setting that you can also toggle via keybind
3. Exit settings (don't have to change any setting from step 2)
4. Use the keybind toggle to change the setting you found in step 2
5. Go to Settings > Addons (It should take you back into the last addon settings page you were in.)
6. Value of the setting you just changed via keybind toggle isn't updated.

Not really sure if it is me or the library. I do have
registerForRefresh = true,
registerForDefaults = true,
Report comment to moderator  
Reply With Quote
Unread 04/25/17, 03:10 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 974
File comments: 593
Uploads: 27
Re: Outdated LibAddOn Message

Originally Posted by Didz
I noticed this when I logged into ESO after the recent patch, and I've read the notes about what to do. But I'm not sure how to identify which AddOn is using the out of date version.

I have about thirty AddOns so is it just a matter f trial and error to detect which it is?
When you have that many addons, it is simpler to just delete the LibAddonMenu folder in each of them and instead install the library as a standalone addon. That way you will have the newest version for all of them.
__________________
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: