Bartender4

Bartender4

70M Downloads

Petbar not hidden after entering vehicle

LudiusMaximus opened this issue ยท 5 comments

commented

I see you are currently working on Bartender4. Thanks for your ongoing efforts!

I know that there are probably more pressing issues for you at the moment, but regarding this, could you maybe just give me a hint where to fix this in your code?

I would be happy to make fork and pull request, if i get this fixed.

Thanks again!

commented

The only reason they would show is if something is showing them manually, or Blizzard is not properly firing events to update the visibility handler.

My guess is on whatever is hiding your UI when you talk to the NPC causing this. It seems likely that it might disrupt the show/hide process.

commented

Ah, you are right! Thanks. I can now look into this myself.

commented

Is there a way for another addon to determine if a Bartender4 frame should be hidden according to the current situation and user config?

local PetBar = Bartender4:GetModule("PetBar")
PetBar ???? visibility.nopet
commented

The visibility control sets an attribute on the bar, "state-vis", which one could read, its either "show", "hide", or "fade" (or "fade:xx" with xx being a percentage)

It could also be nil if no attribute-driven visibility is used at all.

commented

Great, thanks a lot. This prevents my mod from bringing back unwanted frames after the UI fade in:
if BT4BarPetBar and BT4BarPetBar:GetAttribute("state-vis") ~= "hide" then BT4BarPetBar:Show() end