Thread Tools Display Modes
10-19-12, 10:33 AM   #1
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Need help disabling/Enabling Blizzard Multi Bars!

Hi, I was wondering if it is possible to make a script that turns on and off the Blizzard MultiBar's on the left and right?

I want to add it to a button I have on my UI and not sure what I should be looking for. Thank you in advance!

EDIT: I do not want to use MultiBarLeft:Hide() for example because I need it to actually enable and disable for the purpose of moving UI elements next to it. Hiding them or showing them just changes their visibility.
  Reply With Quote
10-19-12, 10:57 AM   #2
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
Last I checked, these are the global variables that the UI uses to control whether the extra actionbars are enabled or disabled. Their values are boolean (true for enabled/false or nil for disabled).
Code:
SHOW_MULTI_ACTIONBAR_1 = false
SHOW_MULTI_ACTIONBAR_2 = false
SHOW_MULTI_ACTIONBAR_3 = false
SHOW_MULTI_ACTIONBAR_4 = true
  Reply With Quote
10-19-12, 12:08 PM   #3
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Thank you, really appreciate it!
  Reply With Quote
10-19-12, 03:48 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You should use the relevant CVars instead of changing global variables. Changing the globals will cause taint, and will probably not persist between sessions.
  • bottomLeftActionBar
  • bottomRightActionBar
  • rightActionBar
  • rightTwoActionBar

In a macro:
Code:
/console bottomLeftActionBar 0
In a script:
Code:
SetCVar("bottomLeftActionBar", 0)
Use 0 to turn the bar off, or 1 to turn it on.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Need help disabling/Enabling Blizzard Multi Bars!


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