Dynamic Menu with LibAddonMenu
Still learning so I hope the answer isn't obvious. I'm testing creating a dynamic menu using LibAddonMenu and I can get the menu to show up with no errors but I'm having an issue when it comes to the get/set. I'm unable to get them to properly read or assign the settings. I'm 90% sure that the issue is getting the "functionGet/functionSet" functions to be uniform and not have part of it be a string just not sure how to accomplish. :confused:
The functions I'm using to create the menu are: Lua Code:
FullCode@ https://github.com/MethosFrost/AllCraft |
No time to review your code but what I can offer is an example (a complex though!):
You can check the FCO ItemSaver code for example, file src/FCOIS_SettingsMenu.lua In the upper part of function BuildAddonMenu you'll find several dynamically created (via loops) settings menus submenus containing checkboxes, dropdown etc. Hope the code helps you. |
LibAddonMenu2 wasn't made with dynamic menus in mind, so adding controls on the fly isn't easily possible. After the panel was opened the first time and all the controls are created, LAM doesn't add any new controls. So you'd have to take care of creating them yourself and since destroying controls isn't possible in ESO, you'd have to manage removing them in a way that doesn't cause a memory leak.
All in all, not something I can recommend if it can be avoided, as it could easily break on LAM updates. |
You always use the same setting called "set".
I guess you want to do: Lua Code:
setting.set is setting["set"]. Not setting.$set like in powershell. |
Quote:
|
All times are GMT -6. The time now is 09:37 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI