View Single Post
02/16/15, 10:07 AM   #50
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by merlight View Post
I've been playing with the settings window for quite some time, today I finally cleaned the code a bit, you can check it out here: https://github.com/merlight/ESO-LibAddonMenu/tree/edge (be warned though that I'm a rebase addict, so anything you commit on top of that might later go through painful merge conflicts)

First I have an important compatibility question

In LAM r16- addon panels are top-level windows with their own background. That means they could be displayed directly with SetHidden(false). Are there any addons exploiting that? Because if the answer is yes and their motives are legitimate, I'm kinda screwed - I was pretty deep into the whole revamp when I realized this, I already had addon panels in a container and had just hopped onto OpenToPanel to make it work with everything else I changed.

Now the less important stuff...

I separated the LAM window from ZO_OptionsWindow completely, it now shows in LAM's own fragment. That's done by "inlining" the previously used function ZO_OptionsWindow_AddUserPanel and providing custom callbacks. I renamed CreateAddonSettingsPanel to CreateAddonSettingsMenuEntry (because that's what the function does), and only call it when the fragment is requested for the first time.

I copied RightPanelBackground and enlarged the window & option area accordingly, but didn't change any option control dimensions yet, so it looks awkwardly empty. Accidentally, I discovered votan's new style branch a few minutes ago, somehow I always forget to git fetch --all. I'll check that out later. (Actually I already have a few questions regarding votan's fork, but they're not LAM-specific so I'll create another topic for them later )

Addon list is now ZO_ScrollList, and there's a search filter box below it. Thanks to ApplyTemplateToControl (i.e. only on PTS) the box displays a hint when the box is empty, although I'm not sure whether it has suitable translations (SI_ITEM_FILTER_BY_TEXT is used in inventory item filter).

Edit: oh and panelData for RegisterOptionsPanel may contain additional .keywords for search, currently the filter searches addon .name + .author + .version. For example SousChef could set .keywords = "crafting provisioning", that way whenever I search for "craft" I get all addons with "craft(ing)" among their keywords, not only in their name. I should document that in source
I have just briefly checked code and it seems that you didn't read my comments to LAM.

- All "half width" widgets in LAM have height set to 55 units. If you want to make custom widgets with different height, widgets will be incorectly anchored. See LAM comments where is possible fix.

- comboboxCounter in dropdown widget should be panel specific, otherwise you can get an UI error because of duplicate names when creating widget controls manually. Again, better explanation is in my LAM comment.

- I don't like colorized addon names in the list. Any chance of using panelData.name instead of panelData.displayName or at least stripping color codes?
Warning: Spoiler


- panel.container should be probably anchored to panel.info (if exists), rather then to panel.label.
Code:
panel.lua:

- 107:	container:SetAnchor(TOPLEFT, label, BOTTOMLEFT, 0, 20+13)
+ 107:	container:SetAnchor(TOPLEFT, control.info or label, BOTTOMLEFT, 0, 20)
- addon panel is too wide. You should either change panel width or width of all widgets. Take a look to any submenu, it looks just ... not right.


A few changes are included in this version of Azurah. Azurah uses coustom made settings and even custom made widget, so it could be good compatibility test.
  Reply With Quote