Go to Page... |
Compatibility: | Scions of Ithelia (9.3.0) Endless Archive (9.2.5) |
Updated: | 03/10/24 04:21 PM |
Created: | 02/14/14 10:28 PM |
Monthly downloads: | 73,974 |
Total downloads: | 4,695,316 |
Favorites: | 2,759 |
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 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 |
Aetheron |
View Public Profile |
Send a private message to Aetheron |
Find More Posts by Aetheron |
Add Aetheron to Your Buddy List |
12/25/16, 11:57 AM | ||||
Re: Re: Re: Custom controls not refreshing on init
My code just shows a workaround for the refresh callback not being called at the correct time and is independent of your initialization code. As for why I added the throttling, that is just a measure to prevent the game from freezing / crashing when an addon has many options, as they were all created within one frame in the past. |
||||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
12/25/16, 07:03 PM | ||||
Re: Re: Re: Re: Custom controls not refreshing on init
I've tried this work around, but it causes an error at line 122 in LibAddonMenu-2.lua - indexing a nil value. It seems that the control.panel is still nil when the created event is received. -A |
||||
|
Aetheron |
View Public Profile |
Send a private message to Aetheron |
Find More Posts by Aetheron |
Add Aetheron to Your Buddy List |
12/26/16, 02:54 AM | ||
Re: Re: Re: Re: Re: Custom controls not refreshing on init
RequestRefreshIfNeeded expects any control except for the panel (maybe something I should fix), so you can set a global reference on one of your controls and use that instead: Lua Code:
|
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
12/26/16, 10:17 AM | ||
Re: Re: Re: Re: Re: Re: Custom controls not refreshing on init
Thanks for the help! -A |
||
|
Aetheron |
View Public Profile |
Send a private message to Aetheron |
Find More Posts by Aetheron |
Add Aetheron to Your Buddy List |
12/26/16, 02:18 PM | |||
Re: Re: Re: Re: Re: Re: Re: Custom controls not refreshing on init
Unfortunatley I don't have enough time to update it right now, so unless you want to wait a month or two, you should just go ahead and release your addon with this workaround. |
|||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
01/04/17, 05:38 AM | |
Italian localization
I just made a PR on Github for the italian localization dude. Just check it out
LINK: https://github.com/sirinsidiator/ESO...onMenu/pull/70 |
|
|
JohnnyKing94 |
View Public Profile |
Send a private message to JohnnyKing94 |
Visit JohnnyKing94's homepage! |
Find More Posts by JohnnyKing94 |
Add JohnnyKing94 to Your Buddy List |
01/04/17, 06:35 AM | ||
Re: Italian localization
|
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Visit sirinsidiator's homepage! |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
01/11/17, 06:53 PM | |
Happy new year, sirinsidiator.
Having a bit of trouble with a dropdown + button combo. Basically, I want to have a dropdown list of sorted names, and let the user select one. Then if they click the button, it deletes the name from the list. I have registerForRefresh set on my panel, however when I click the button the name remains in the dropdown list until I /reloadui. Is there any way to force the contents of the dropdown to refresh when I hit the button? I have tried a function that manually rebuilds my choice table when I hit the button, but it still won't refresh until a /reloadui. EDIT: I tried your workaround below using the CALLBACK_MANAGER and a global reference on the button, however it seems to not work with buttons since they aren't actually changing anything, it doesn't trigger a refresh of the other controls. Of course, I can't put it on my dropdown as that will refresh all BUT the list... Is there a way to trigger this exclusive refresh from a button control reference? EDIT EDIT: I tried setting a disabled function on my dropdown control to disable the button if nothing was selected, then set the selection back to nothing when I hit the button, thinking changing the button state from enabled to disabled MIGHT trigger the callback... Nope. EDIT EDIT EDIT: I tried creating a new checkbox control that is always off but gets set on when you choose a name in the dropdown, and set back off when you hit the delete button, and attached the workaround callback to that control. This still doesn't update the contents of the dropdown table. EDIT EDIT EDIT EDIT: So I just worked around this for now by adding a warning that clicking the delete button will reload the UI then added ReloadUI() to the button's function.
Last edited by Phinix : 01/11/17 at 07:47 PM.
|
|
|
Phinix |
View Public Profile |
Send a private message to Phinix |
Visit Phinix's homepage! |
Find More Posts by Phinix |
Add Phinix to Your Buddy List |
01/12/17, 02:34 AM | ||
The current version of LAM was actually never built with dynamic menus in mind. I am slowly pushing it in that direction, but there is still a long way to go. For now you can try to call LAM.util.RequestRefreshIfNeeded after you called UpdateChoices: Lua Code:
Calling reloadUI directly from your settings panel is also highly discouraged as it makes for a very bad user experience and I will find you and hit you with a spoon until you start using the newly added requiresReload flag on your controls instead. :P |
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Visit sirinsidiator's homepage! |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
01/13/17, 05:07 PM | ||
Just have to figure out how to hold off setting the name database entry to nil until the user actually reloads the UI, or cancel it if they don't. Since it is one control (button) controlling removal from another (dropdown) in my case. Side note: I find the fortune teller's facial expressions in the spoon video intriguing.
Last edited by Phinix : 01/13/17 at 05:44 PM.
|
||
|
Phinix |
View Public Profile |
Send a private message to Phinix |
Visit Phinix's homepage! |
Find More Posts by Phinix |
Add Phinix to Your Buddy List |
02/09/17, 06:10 AM | |
|
JohnnyKing94 |
View Public Profile |
Send a private message to JohnnyKing94 |
Visit JohnnyKing94's homepage! |
Find More Posts by JohnnyKing94 |
Add JohnnyKing94 to Your Buddy List |
02/09/17, 06:28 AM | ||
|
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Visit sirinsidiator's homepage! |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
03/22/17, 12:34 PM | |
|
Hey, lovely work from everybody that contributed to LAM. And while I dont consider myself as great as you all I do have a nice addition that I wanted to share. It is an expansion of the dropdown control to make it work with large amounts of entries. Most of the work is done by ZO_ScrollableComboBox but a few changes were needed to avoid issues with focus inside the dropdown list.
Code:
control.combobox = wm:CreateControlFromVirtual(zo_strjoin(nil, name, "Combobox", comboboxCount), control.container, dropdownData.scrollable and "ZO_ScrollableComboBox" or "ZO_ComboBox") .... local dropdown = control.dropdown dropdown:SetSortsItems(false) -- need to sort ourselves in order to be able to sort by value if dropdownData.scrollable then ZO_PreHook(dropdown, "ShowDropdownOnMouseUp", function(self) self.lastParent = self.m_scroll:GetParent() self.m_scroll:SetParent(ZO_Menus) ZO_Menus:BringWindowToTop() end) ZO_PreHook(dropdown, "HideDropdownInternal", function(self) self.m_scroll:SetParent(self.lastParent) end) end
Last edited by Kyoma : 03/22/17 at 07:00 PM.
|
|
Kyoma |
View Public Profile |
Send a private message to Kyoma |
Visit Kyoma's homepage! |
Find More Posts by Kyoma |
Add Kyoma to Your Buddy List |
03/22/17, 02:57 PM | ||
Hey Kyoma. Thanks for the contribution. Could you please make a pull request on github? Otherwise I'll loose track of who contributed what. It also makes it easier for me to review your proposed changes.
|
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Visit sirinsidiator's homepage! |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |