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,668 |
Total downloads: | 5,008,672 |
Favorites: | 2,825 |
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 |
04/22/14, 03:14 PM | |
Hi,
when I look to the standard menus coming with ESO, I notice that settings can be deactivated/disabled (displayed greyed-out), depending on the state of another setting (e.g. when I turn a checkbox to OFF, dependant settings are not useful and thus are displayed deactivated). I would like to have such a feature for my addon. I think I would need (1) a callback which fires whenever a setting is changed and (2) a way to disable a setting. Callback: Is there such a callback or event handler I can register for checkboxes, sliders, colorselection etc.? Disable settings: I tried to call setDisabled(boolean) and setEnabled(boolean) for the settings, but these function do not exist. Is there a function I can call to disable a setting? Any idea? Cheers, Klaus |
|
|
klaro00 |
View Public Profile |
Send a private message to klaro00 |
Find More Posts by klaro00 |
Add klaro00 to Your Buddy List |
04/21/14, 08:37 AM | ||
|
|
|
|
Seerah |
View Public Profile |
Send a private message to Seerah |
Find More Posts by Seerah |
Add Seerah to Your Buddy List |
04/21/14, 07:13 AM | |
|
A real nice function would be the ability to collapse header. You see it on the main menu. You click settings and it expands settings. I don't doubt it would be involved and a bit of a hack, but it's a library. Supporting additional types beyond the stock ones and additional functionality is a natural extension of the library.
When it comes to additional types an addon supplied dialog would be one of the most desirable. A list is getting a bit cumbersome with even simple addon with lots of checkboxes. As an example I'm working on an addon that has checkboxes for enable and logging along with a slider in seven categories. A dialog could do that in seven lines, i.e. two checkboxes and slider on each line with row and column labels. As a list though it's actually 28 lines, more actually. I can use a button to pop up a detailed options dialog with this providing basic options which I'll likely do at a later date, but it would be nice if it just popped a custom dialog. Particularly here since I have no user interface, just settings. A slash command or keybind to pop the dialog is a bit obscure for non-techie users. If you could pop a dialog you would be able to address the complaint below about just how many settings you can end up when you have lots of addons installed. A tie in with ESOUI would be real cool. I don't know if ESO supports metadata like WoW, but tags for categories in the manifest would seem a natural. You could upload the addon with it pulling the tags from the manifest then those same tags used for categories of settings by your library. Certainly not a now or soon suggestion, but long-term certainly, to me, a growth path for the library. Along the same lines, since you go into this business, a separate library to attaching to standard dialogs would be nice. I'll make a general post for that though. While a separate library it seems a good niche to be the one that makes things play nice together. Having this addon gives you a bit of authority. |
|
LilBudyWizer |
View Public Profile |
Send a private message to LilBudyWizer |
Find More Posts by LilBudyWizer |
Add LilBudyWizer to Your Buddy List |
04/14/14, 09:30 AM | ||
|
|
|
|
Seerah |
View Public Profile |
Send a private message to Seerah |
Find More Posts by Seerah |
Add Seerah to Your Buddy List |
04/14/14, 02:19 AM | |
|
Will this addon be updated at some time to create its own "ADD-ONS SETTINGS" section under ADD-ONS in the menu? I really dislike having so many extra settings inside the settings menu.
|
|
Tingle0x539 |
View Public Profile |
Send a private message to Tingle0x539 |
Find More Posts by Tingle0x539 |
Add Tingle0x539 to Your Buddy List |
04/13/14, 02:01 AM | |
|
'Defaults' not applied correctly for EditBox, Checkbox, other?
When I click "Defaults" I get some odd behavior, and in some cases it appears to disable itself which may actually be intentional within LibAddonMenu (but oddly undesirable in at least one case of mine.)
I'm going to PM you a new version of LibAddonMenu in a bit, hopefully you can take a look at it compared to what is in r6 and see my intent. Right now what I have will work, but I feel like it's prone to error if LibAddonMenu ever changes how it builds some of its controls (and I'll be stuck refactoring my code.) Similarly, I can't be the only person to need support for resets and re-initialization to predetermined defaults. |
|
wilson0x4d |
View Public Profile |
Send a private message to wilson0x4d |
Visit wilson0x4d's homepage! |
Find More Posts by wilson0x4d |
Add wilson0x4d to Your Buddy List |
04/11/14, 10:06 PM | ||||
|
Re: Panel Hide/Show Events?
Lua Code:
MyControlNameEdit:SetMaxInputChars(x)
|
|||
|
Seerah |
View Public Profile |
Send a private message to Seerah |
Visit Seerah's homepage! |
Find More Posts by Seerah |
Add Seerah to Your Buddy List |
04/11/14, 07:57 PM | |
|
Panel Hide/Show Events?
Seerah, is there an event we can hook to notify us when the our panel closed (e.g. when options have been saved) ?
Similarly is there an event we can hook to notify us before the UI is displayed? (this latter is not as important, but equally useful.) I scanned the source code, didn't see what I was looking for. Not being familiar with WindowManager and ZO_OptionsPanel APIs I figure I should ask you and see if it's something you can add if not already present. The idea, of course, is that when the options are changed I'm able to process new values. I realize I can perform this kind of work from within the get/set methods defined when creating controls through LAM, but a single event would be more efficient. Additionally, there seems to be a limit on how much text can be typed into an EditBox, is this an ESO imposed limit? Is there any way for us/you to increase that limit? Thanks for a great Add-On btw, has saved me who knows how much time and effort!
Last edited by wilson0x4d : 04/11/14 at 08:40 PM.
|
|
wilson0x4d |
View Public Profile |
Send a private message to wilson0x4d |
Visit wilson0x4d's homepage! |
Find More Posts by wilson0x4d |
Add wilson0x4d to Your Buddy List |
04/11/14, 07:32 AM | |
Seerah, thank you for this awesome lib, this made adding a high quality options page to my add-on SOOOO easy!
|
|
|
Stormknight |
View Public Profile |
Send a private message to Stormknight |
Send email to Stormknight |
Visit Stormknight's homepage! |
Find More Posts by Stormknight |
Add Stormknight to Your Buddy List |
04/09/14, 08:46 PM | ||
|
|
|
|
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 |
04/09/14, 12:49 PM | |
|
Small bug I noticed while creating the menu for the SpamFilter addon:
LibAddonMenu-1.0.lua on line 330: The current line says title:SetText(headerText), but the correct variable would be titleText (headerText isn't used anywhere else). |
|
Smaxx |
View Public Profile |
Send a private message to Smaxx |
Send email to Smaxx |
Visit Smaxx's homepage! |
Find More Posts by Smaxx |
Add Smaxx to Your Buddy List |
04/08/14, 10:58 PM | |
text feild editable
I was wondering if you could make the text field load with a function as well. For example if i want to display a guild name it will fetch it each time the ui is opened!
|
|
|
amilious |
View Public Profile |
Send a private message to amilious |
Send email to amilious |
Visit amilious's homepage! |
Find More Posts by amilious |
Add amilious to Your Buddy List |
04/06/14, 08:53 AM | |||
|
You can use a header element then a descriptions element using \n ( new line ) within the description for the breaking of lines. And do what you need to do.
|
||
|
Kallak |
View Public Profile |
Send a private message to Kallak |
Send email to Kallak |
Visit Kallak's homepage! |
Find More Posts by Kallak |
Add Kallak to Your Buddy List |
04/06/14, 12:17 AM | ||
The following code will create this... Lua Code:
So the above code creates a Header with a empty heading to get the separator line only (there might be a better way to do this I'm a noob). The second line "local mmoui_description" contains the text to be shown below the description title. and uses \n for eol. NOTE: white space is critical for indenting. tab's will not work so use spaces. Finaly "LAM:AddDescription", LAM:AddDescription(panelID, controlName, descriptionText, title) [, title] being optional as Seerah explained I may be 100% how it was meant to work, but it does the trick this way.
Last edited by tiomun : 04/06/14 at 12:26 AM.
|
||
|
tiomun |
View Public Profile |
Send a private message to tiomun |
Send email to tiomun |
Visit tiomun's homepage! |
Find More Posts by tiomun |
Add tiomun to Your Buddy List |