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,662 |
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 |
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 |
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 |
Find More Posts by peltco |
Add peltco to Your Buddy List |
07/05/15, 04:54 AM | |
Hi Atropos,
Thanks for your request. I created a ticket over at github. I like the idea of adding callbacks for opening and closing the panel. Certainly makes things a bit easier for some addons. I'll have to check what the implications are, but it should be easy enough and possible to add it in the next release. |
|
|
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 |
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 |
07/04/15, 03:25 PM | |||
I think I can make this work. I still think some documentation added to the LAM wiki pages to make it a little more transparent what the best practices are for doing things while your own addon's menu is displayed would be very valuable for other authors.
Last edited by Atropos : 07/04/15 at 03:42 PM.
|
|||
|
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 |
07/04/15, 02:51 PM | ||
|
|
|
|
merlight |
View Public Profile |
Send a private message to merlight |
Send email to merlight |
Visit merlight's homepage! |
Find More Posts by merlight |
Add merlight to Your Buddy List |
07/04/15, 02:10 PM | |
Hi Sirinsidiator,
Thanks for your continued work on LAM. I really like the new aesthetic look and some of the new control types seem very useful. That being said, I have some feedback as a user of your library that I hope you can assist with incorporating into a near future release. Here's a short synopsis: Objective: As an addon author, I would like to take advantage of a simple set of callbacks for when my addon settings panel is open, and when it has been closed. I would like to use these callbacks to easily show certain addon elements on screen next to the settings panel so that my users can customize the look of their addon in real-time. Current Issues: 1) The existing callback "LAM-RefreshPanel" will fire the first time the panel is opened, and when you switch back-and-forth with other panels. It WILL NOT fire when you have already set up the panel, closed the settings, and re-opened the settings panel. This makes it difficult to determine when the settings panel is open. 2) There is no callback for when the panel is closed directly. I can use "LAM-RefreshPanel" to know when the user switches to a different addon's settings panel, but if the user closes the settings menu directly there is no callback. 3) LAM-RefreshPanel fires before the settings menu is actually open, so checking LAM.currentAddonPanel or other conditional checks may be inaccurate if run during the callback. Proposed Solution I would like to see two new callbacks added to the library that are very simple for authors to use and understand. It seems like RefreshPanel has become more of a catchall callback for use internally to the workings of the library itself. I would suggest the following:
Perhaps there is already an easy way to achieve what I want to do, but it is not documented and the solution I have developed is pretty clumsy. Please let me know if you have any questions or feedback. |
|
|
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 |
06/23/15, 03:01 AM | |||
The issue with disabled items not going grey seems to have "magically" resolved itself. The only thing I can think is that I was running into another problem that was breaking the reading in of the table and that was the symptom I noticed of a larger issue. This leads me to a repeatable bug: On the wiki page the iconpicker (AWESOME by the way) says that the "choicesTooltips" is optional, however it is not in fact optional and will give a "nil value" error if you attempt to load the panel without specifying this field. I haven't played with the color issue in a while but I'm pretty sure it was a syntax issue on my end as I have seen other addons make it work. I'll have to look at how they did it for examples.
Last edited by Phinix : 06/23/15 at 03:03 AM.
|
|||
|
Phinix |
View Public Profile |
Send a private message to Phinix |
Send email to Phinix |
Visit Phinix's homepage! |
Find More Posts by Phinix |
Add Phinix to Your Buddy List |
06/21/15, 03:23 AM | ||
EDIT: Just saw your other comment from last month. Did you solve that problem? I will update the addon list sometime soon. It's a lot of work even though I wrote a tool that already makes it a lot easier. Maybe some day I'll have enough motivation to improve it so it can automatically update the list.
Last edited by sirinsidiator : 06/21/15 at 03:28 AM.
|
||
|
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 |
06/19/15, 11:49 AM | |
I discovered a bug in the new version:
If you have a checkbox type with a disabled check that evaluates true (so it should be disabled) but the checkbox' option value was previously set to on (or true) before the setting for it's disabled option was changed, the text for the option title does not get properly greyed out.
Last edited by Phinix : 06/19/15 at 11:50 AM.
|
|
|
Phinix |
View Public Profile |
Send a private message to Phinix |
Send email to Phinix |
Visit Phinix's homepage! |
Find More Posts by Phinix |
Add Phinix to Your Buddy List |
05/14/15, 11:57 AM | |
Excellent resource, many thanks!
One quick question. Is it possible to update the display based on set functions? For example, I store the color of a menu item text in a global variable. In my set function for color picker I change this global variable to the new r,g,b,a table, but the text of the menu item that uses it doesn't update unless I do a /reloadui. Also, ESO Master Recipe List didn't make it to the list of addons using LibAddonMenu-2.0. |
|
|
Phinix |
View Public Profile |
Send a private message to Phinix |
Send email to Phinix |
Visit Phinix's homepage! |
Find More Posts by Phinix |
Add Phinix to Your Buddy List |
05/10/15, 07:27 PM | ||||
I've just uploaded a modified r-18 for my little feature Include the metafile, the 18 rev, all modifications done in controls files and updated control revision too. tested, seems working as a charm. (removed) It is basically a : Lua Code:
Last edited by Ayantir : 05/14/15 at 12:01 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 |
04/26/15, 04:27 AM | |||
There is still a bit of RL work that eats up all of my daily coding time, but once that is over I'll look into those. |
|||
|
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 |
04/26/15, 04:10 AM | ||
I made the experience that image files need to have a width and height with a power of 2. Try to resize the image to 512x16. If that does not help, you can also try to close the game and delete the ShaderCache.cooked file. That also seems to help with texture problems quite often. |
||
|
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 |
04/25/15, 03:11 PM | |
Is there a problem with textures?
The code below just makes a gap in the menu. No graphics are shown. Not even the tooltip is shown. All other controls works fine. Lua Code:
I assume image path is based on Addons as root folder. I also assume that the image format is the same as for pins. What am I missing?
Last edited by SnowmanDK : 04/25/15 at 03:11 PM.
|
|
|
SnowmanDK |
View Public Profile |
Send a private message to SnowmanDK |
Send email to SnowmanDK |
Visit SnowmanDK's homepage! |
Find More Posts by SnowmanDK |
Add SnowmanDK to Your Buddy List |