Custom Aura Addon Breaks in Combat
I wrote an addon that hides or shows specific Bartender buttons in relation to specific auras (anyone wondering: I basically use it as part of a WeakAuras aura setup).
Anyway, it works perfectly outside of combat, and it stops working in combat. Code:
local frame = CreateFrame("frame") |
I figured out what the problem is.
It's impossible to Show() or Hide() any of the Bartender buttons while in combat. Is there any solution to this? I wanted my Masque border texture around a WeakAuras aura, so coded my addon to show/hide the Bartender buttons so that they would only appear when the WeakAuras aura appeared. Since the Bartender stuff can't be shown or hidden in combat, any solution to this? |
All action buttons are secure frames, and secure frames can't be hidden/shown in combat (in order to prevent automated actions).
What you can do in combat is change the button visibility using SetAlpha, but keep in mind that in that case, the button will always be there even when fully transparent. So if the button can be clicked, it will always occupy that screen space with its clickable area. If all you're after is the visual border or icon, you might need to look into other ways of showing the appropriate textures on screen in a way that doesn't tie it to a clickable secure frame. |
Ah thanks for the answer!
SetAlpha would be OK with me. Could you quickly show me how to do it? |
Quote:
Of course, as I mentioned, using this method means the frames will technically always have to be shown and will probably always be clickable depending on how Bartender works, regardless of whether the buttons are transparent or not at any given moment. |
Thank you, I've achieved exactly what I wanted.
The Bartender bar is a pure cooldown display. I can select "Clickthrough" in the Bartender options and it's done. Thanks a lot! |
Also note that if you have Bartender set to actually hide your bars under certain conditions, then the buttons on those bars will stay hidden no matter what you set their opacity to. You would need to use Bartender's "fade" feature instead of hiding the bars.
|
Quote:
Maybe that's not the most elegant and efficient way, but it's what works best for me. Transparent at player enter world, fully visible at player regen disabled, and then my own custom interaction with one button and WeakAuras. |
All times are GMT -6. The time now is 05:30 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI