Thread Tools Display Modes
02-06-23, 09:20 AM   #1
randomturtle
A Defias Bandit
Join Date: Feb 2023
Posts: 2
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!

Last edited by randomturtle : 02-06-23 at 09:27 AM.
  Reply With Quote
02-07-23, 01:40 AM   #2
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
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.
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
02-07-23, 03:04 PM   #3
randomturtle
A Defias Bandit
Join Date: Feb 2023
Posts: 2
Originally Posted by LudiusMaximus View Post
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.
  Reply With Quote
02-07-23, 07:17 PM   #4
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,359
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)
  Reply With Quote
02-10-23, 11:26 AM   #5
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
Originally Posted by randomturtle View Post
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.
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Hiding and showing action bars

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off