View Single Post
06/17/14, 03:31 AM   #3
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Sasky View Post
I actually had that same sort of sorting code running to initially test some of LAM2 features, then toned it down to that release.

I'd suggest running a whitelist (instead of blacklist) and/or running something with its own menu so users can opt-in to an upgraded menu (and test themselves).

As well, why aren't you defining the blacklist/whitelist with the addon name/id as the key? Then you won't need to loop over the table to check.
I'm not really sure how to link addon name and panelID. Is there a way to find out which addon has called library? If I just display controlPanelID, it could look like "_mainPanel" which is not too helpful.

Originally Posted by Sasky View Post
-------------------------

There are several different levels of LAM usage I noticed:
1) Only use LAM-1.0 APIs to create windows and don't touch return values (except as passing into LAM functions)
This works with no issues.

2) Use LAM and the return values to adjust further.
This is trickier, but you could potentially register these calls and replay them later once the menu is created. It might be possible to do this in bulk with metatable programming (not entirely sure how the index table works with a function).
This can help with control adjustments (size, color, enable/disable...). But the main issue for me is when someone adds custom control to the panel (Inventory Insight, Undiscovered) - a simple table doesn't work here. Creating a dummy window, so they can set parent or anchor to it could work. But it also means that number of created controls will doubled.

Originally Posted by Sasky View Post
3) Get panel directly using ESO functions or directly modify LAM internal variables (lastAdded or whatever).
Even harder...

---------------

The one thing I'm not sure how you'd address is if addons define the panel immediately and not in any sort of initialization callbacks. That leaves it to the whim of the addon ordering.
I have used "hack" that I created dummy LibAddonMenu-1.0 foder with manifest, because most of the addons has set optional dependency to this library. It allows me to load my addon first.

Anyway, right now I'm thinking about different approach.
I can leave addons to create their menus and then just reanchor all children from LAM-1.0 settings menu to the LAM-2.0 panels.

By the way Harven is trying to do somethig like this addon, but for use with his HAS:
http://www.esoui.com/downloads/info5....html#comments