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: | 63,066 |
Total downloads: | 4,703,072 |
Favorites: | 2,761 |
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 |
circonian |
View Public Profile |
Send a private message to circonian |
Send email to circonian |
Find More Posts by circonian |
Add circonian to Your Buddy List |
11/01/15, 07:03 PM | ||||
|
Warning: Spoiler
|
|||
|
merlight |
View Public Profile |
Send a private message to merlight |
Send email to merlight |
Find More Posts by merlight |
Add merlight to Your Buddy List |
11/01/15, 03:03 PM | |
|
DropDown Request:
I don't know about anyone else, but many times when creating a dropdown box I wish I had the ability to pass choices a table with key/value pair rather than just values. As an example, instead of doing something like this:
Warning: Spoiler
Lua Code:
Have the ability to include other data with the values like this:
Warning: Spoiler
Lua Code:
As long as we included the key/value pair: name = "whatever" the box could easily be populated with minimal changes:
Warning: Spoiler
Lua Code:
Although I'm not sure how that would effect any other LAM code. It would make some things much easier to handle rather than having to always translate the options:
Warning: Spoiler
Lua Code:
It would be nice to not have to do that, but instead just grab whatever associated value/constant that we use for that option from the table: Lua Code:
I do realize addons that use dropdowns would have to update their LAM code. Although it may not be desired, a check could be added for legacy compatability to prevent that. Something like:
Warning: Spoiler
Lua Code:
Just a thought, thanks for all your hard work !! |
|
circonian |
View Public Profile |
Send a private message to circonian |
Send email to circonian |
Find More Posts by circonian |
Add circonian to Your Buddy List |
11/01/15, 01:47 PM | ||
And I think Ayantir meant that you specify halfWidth on the checkbox controls, not the submenu itself. That way you can fit more checkboxes in. Just wondering, but why do you need 160 checkboxes in the first place? |
||
|
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 |
11/01/15, 01:16 PM | |
line 59 of submenu.lua :
Lua Code:
But you should submit a bug or consider to use width="half" ? It will permit you to use ~ 160 buttons.
Last edited by Ayantir : 11/01/15 at 01:18 PM.
|
|
|
Ayantir |
View Public Profile |
Send a private message to Ayantir |
Send email to Ayantir |
Visit Ayantir's homepage! |
Find More Posts by Ayantir |
Add Ayantir to Your Buddy List |
10/31/15, 06:16 PM | ||
Re: Checkbox Bug
|
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Visit sirinsidiator's homepage! |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
10/31/15, 05:27 PM | |
|
Checkbox Bug
If a checkbox control has its value set to true & disabled returns true the checkbox will get greyed out with the ZO_DEFAULT_DISABLED_COLOR, but the label will not. The label will be ZO_DEFAULT_ENABLED_COLOR.
UpdateDisabled() gets called before UpdateValue() which runs ToggleCheckbox() and it changes the color back to the enabled color.
Warning: Spoiler
Lua Code:
Reversing the call order wont help though because the color also gets messed up if you manually update a disabled checkbox value to true with: Lua Code:
|
|
circonian |
View Public Profile |
Send a private message to circonian |
Send email to circonian |
Visit circonian's homepage! |
Find More Posts by circonian |
Add circonian to Your Buddy List |
10/29/15, 12:16 PM | ||
Ok, I found ! I should have done : Lua Code:
Thank you |
||
|
Ayantir |
View Public Profile |
Send a private message to Ayantir |
Send email to Ayantir |
Visit Ayantir's homepage! |
Find More Posts by Ayantir |
Add Ayantir to Your Buddy List |
10/29/15, 11:31 AM | |
How did you specify your panel?
The following should be enough to refresh the whole panel: Lua Code:
The important part is that you activate the registerForRefresh flag and pass the correct object to the callback. |
|
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Visit sirinsidiator's homepage! |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
10/29/15, 10:09 AM | |
Hello siris!
I got an addon with a profile integration, list of profiles are in a dropdown, with a panel with registerForRefresh. When i set the value, all my LAM settings (241 controls) are automatically refreshed and set to the correct values (yeah \o/) But I also got an UI (not in LAM) and a binding to switch between profiles. If I can without a problem switch my addon profiles, LAM isn't refreshed. I tried a Lua Code:
But it does not work, so I looked to panel.lua and tried : Lua Code:
It works, but if LAM is not yet created, it does nothing (array is not built). and it does update my whole panel except the dropdown itself. So I looked into dropdown.lua, and if Lua Code:
Any ideas or possibilities for me ? PS: I could also call the callback by pushing a texture or a description (per exemple). It won't be modified.. it could work. Thank you.
Last edited by Ayantir : 10/29/15 at 10:12 AM.
|
|
|
Ayantir |
View Public Profile |
Send a private message to Ayantir |
Send email to Ayantir |
Visit Ayantir's homepage! |
Find More Posts by Ayantir |
Add Ayantir to Your Buddy List |
09/15/15, 04:08 AM | |
Thanks for the reports. I created tickets for them and will fix them in the next version.
|
|
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Visit sirinsidiator's homepage! |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
09/14/15, 11:26 PM | ||
Lua Code:
|
||
|
votan |
View Public Profile |
Send a private message to votan |
Send email to votan |
Visit votan's homepage! |
Find More Posts by votan |
Add votan to Your Buddy List |
09/14/15, 07:42 PM | |
If you create settings panel which doesn't contain any widget, library won't fire callback "LAM-PanelControlsCreated".
I was using this callback to find out when panel is shown for the first time (when controls should be created) and I was creating my custom settings layout in there (Azurah, Srendarr). I had to find different solution because of this change in LAM-2.0 r18. |
|
|
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 |
09/14/15, 06:37 PM | |
|
If a panel is set to refresh, registerForRefresh= true, the colorPicker fires the setFunc non-stop as the colors are changed, even though the user has not clicked "Accept" to set the color.
I know its set to register for refresh, but the user hasn't actually changed the color yet. Should setFunc even be firing as the colorPicker changes values? In some ways its nice to see the colors changing as you drag the color picker around, but it also fires setFunc a lot. The slider does not function that way. It doesn't fire setFunc until you stop dragging the slider (which is kind of like clicking accept). I guess it's not really a huge deal, and may be intentional (except that ESC key thing), but either way I just thought I would let you know.
Last edited by circonian : 09/14/15 at 06:45 PM.
|
|
circonian |
View Public Profile |
Send a private message to circonian |
Send email to circonian |
Visit circonian's homepage! |
Find More Posts by circonian |
Add circonian to Your Buddy List |
09/08/15, 07:44 AM | |
Forum posts: 2
File comments: 12
Uploads: 0
|
will you have a new release for us with the new update? I just love to have all my addons updated
|
|
peltco |
View Public Profile |
Send a private message to peltco |
Send email to peltco |
Visit peltco's homepage! |
Find More Posts by peltco |
Add peltco to Your Buddy List |