Leatrix Plus (The War Within)

Leatrix Plus (The War Within)

31M Downloads

Combine Addon Buttons not showing all buttons

Greylight1180 opened this issue ยท 3 comments

commented

Enhance Minimap - Combine Addon Buttons is not showing all buttons. If unchecked all the buttons show around the minimap, but when combined it doesn't show them all. Specifically Armory addon button is being left unseen.

commented

This appears to be caused by the Armory addon. I added a workaround for this particular addon in the latest alpha so that it works with 'Combine addon buttons'.

commented

Thank you for the quick response. If it's any help the issue does not happen with similar minimap button hiding addons, Minimap Buttonbag Reborn & Hiding Bar.

Also as a side note I just recently discovered this addon and it's awesome, thank you for all the work you put into it.

commented

Combine addon buttons works differently to other button hiding addons because it uses LibDBIcon extensively (a library written by Funkydude which is used by over 80% of addons that feature a minimap button).

The reason it wasn't working for Armory is because, before showing a button in the button frame, LTP checks to see whether that button should be shown or hidden (for example, if you have the minimap button disabled in Armory settings, you wouldn't want it shown in the button frame). It does this by querying a standard setting provided by LibDBIcon called hide. If hide is set to true, the button is not shown in the button frame. Hide would typically be set to true if you have the button disabled in the addon configuration panel.

When LTP queries Armory for the hide setting, Armory replies that hide is set to true even if the button is enabled in Armory settings. So LTP wasn't showing it in the button frame and that's why I said that Armory appears to be the cause of it. The workaround sets Armory's hide setting to false so that Combine addon buttons shows it in the button frame. This is the only addon (ever) that I have had to add a workaround like this for. Every other addon tested returns an accurate hide value.

When checking Armory on Classic, I noticed that the minimap button wouldn't show up at all if you have any other addon installed which uses LibDBIcon. The minimap button was there, but it wasn't showing because it's hide value was set to true. Going into the Armory settings panel (minimap page) prompts the button to show up. This behaviour was experienced without any Leatrix addons loaded at all. Just Armory loaded along with another LibDBIcon enabled addon (such as BugSack/BugGrabber, Bartender, etc) was enough to cause the button to not show. Clearly, there are problems with Armory's implementation of LibDBIcon.

I did add the workaround for Armory on Classic (latest alpha releases) but it only works if you have Combine addon buttons enabled.

Ideally, Armory's code should be updated so that it uses LibDBIcon's own settings for button position and visibility. LibDBIcon automatically saves these settings in the host addon's saved variables file but Armory is using its own settings which leads to problems like this. There is a helpful guide here on how to implement LibDBIcon into an addon.