LibAddonMenu-2.0: Dynamic Menu Options?
Is there a way to get LibAddonMenu-2.0 to re-make your addon's options menu?
For example, if a player is not a vampire at addon load time, information about the vampire skill line is not available. So, it is impossible to add vampire-skill-related options to the menu. But if the player were to become a vampire during that play session, could the vampire skills menu options be added the next time the menu gets opened, or must the player reload the UI? Does my question make sense? |
#1
You could add vampire related options but have them be disabled if the player is not a vampire. (Using a database of the vampire skill line.) #2 You can add vampire related options directly (manually) using the LAM 2.0 widget API to the end of your options list. If you use LAM to create/build your options list for you, then it will only do so when your addon's options window is registered and shown. Anything more advanced than that, and you get into advanced LAM usage. |
Okay, that's what I figured. (I'm probably going to go with option 1, using a local data table as a backup if the real data isn't available.)
Thanks Seerah! This is a fun tool, and I'm enjoying using it! |
I'm using this to rebuild LAM option when someone join / leave a guild.
It rebuild the option panel, works well ! Lua Code:
|
Without seeing the rest of your pChat.buildOptionsTable function, I don't know what you're doing here. If all you're doing is changing entries in a dropdown menu, there is a much easier way to take care of this.
If you're actually adding/removing options widgets to your settings panel (which I believe is what katkat42 wants to do), then this shouldn't work after you've opened your panel for the first time and the options have been created.
|
Oh, you're right. It's working only if you didn't go on the option panels before..
damn. hopefully for me, users don't go on option panels often. But it could be a nice feature to add (and there's more than a dropdown menu for me.. 1 header, 2 editbox, 1 drop, and 4 colorsettings per guild) Thanks in advance? :D |
Funny, just wrote something for this
Seerah, when DataDaedra is finished consuming my time and patience, I'm hoping to run something by you that is exactly what I think everyone is asking for. Already tested it tonight, just needs a little spit and polish. Nearly done updating DD for 100009 (no sleep till update).
Everyone else: Sit tight :D |
All times are GMT -6. The time now is 04:09 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI