WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Hiding and showing action bars (https://www.wowinterface.com/forums/showthread.php?t=59503)

randomturtle 02-06-23 09:20 AM

Hiding and showing action bars
 
Hello. I'm fairly new to creating WoW addons so any help would be appreciated!

I'm hiding some action bars using actionbar:Hide() and then reshowing them using actionbar:Show(). Seems like it should be simple but I think I must be missing something as it doesn't work as intended. After hiding and then showing the bars, some but not all of the bars appear properly. According to the framestack, the improperly showing ones are still there, but when moving spells or opening the spell book they do not show up like they are actually there.

I turned off all addons and even just created a simple macro doing this and the issue still persists. Is this some kind of a bug or am I just doing this improperly? Any help or direction would be appreciated, thanks!

LudiusMaximus 02-07-23 01:40 AM

Hi! Could you give a reproducible example with the action bar in question?
Notice, that you are not allowed to show/hide action bars while in combat.

randomturtle 02-07-23 03:04 PM

Quote:

Originally Posted by LudiusMaximus (Post 342132)
Hi! Could you give a reproducible example with the action bar in question?
Notice, that you are not allowed to show/hide action bars while in combat.

Sure thing!

Hide Bar Marco
Code:

/script MainMenuBar:Hide();
/script MultiBarBottomLeft:Hide();
/script MultiBarBottomRight:Hide();
/script MultiBarRight:Hide();
/script MultiBarLeft:Hide();

Show Bar Macro
Code:

/script MainMenuBar:Show();
/script MultiBarBottomLeft:Show();
/script MultiBarBottomRight:Show();
/script MultiBarRight:Show();
/script MultiBarLeft:Show();

I did find a small workaround but it's a little inconvenient, unless there is a way to do it through lua. If you go into Blizzard's edit mode and turn on "Always Show Buttons". The problem doesn't seem to happen, but when it's turned off, the problem seems to occur.

Dridzt 02-07-23 07:17 PM

You cannot show/hide protected frames in insecure ways.

If that was possible it would be fairly trivial to have an addon play the game for you by hiding every button but the one you should be hitting next.

Show/hide/move for protected frames (premier examples being actionbars and unitframes) can only be done under the constraints of the secure system.

Simplistically you can only use macro conditionals and some actions will still require a hardware action on top (a player click or keypress)

LudiusMaximus 02-10-23 11:26 AM

Quote:

Originally Posted by randomturtle (Post 342133)
Hide Bar Marco
Code:

/script MainMenuBar:Hide();
/script MultiBarBottomLeft:Hide();
/script MultiBarBottomRight:Hide();
/script MultiBarRight:Hide();
/script MultiBarLeft:Hide();

Show Bar Macro
Code:

/script MainMenuBar:Show();
/script MultiBarBottomLeft:Show();
/script MultiBarBottomRight:Show();
/script MultiBarRight:Show();
/script MultiBarLeft:Show();


Works for me, but of course only while not in combat.


All times are GMT -6. The time now is 06:41 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI