Thread Tools Display Modes
02-09-12, 04:04 PM   #1
laukond
A Black Drake
Join Date: Dec 2011
Posts: 87
Move experience bar and change the width of it

I use this code to move my bars:

LUA Code:
  1. MultiBarBottomRight:ClearAllPoints()
  2. MultiBarBottomRight:SetPoint("BOTTOM",-254,100)
  3. MainMenuBar:ClearAllPoints()
  4. MainMenuBar:SetPoint("BOTTOMRIGHT",50,0)

Problem is the exp bar is stuck to my action bars.

- How do I "unstuck" the exp bar from the action bars, so I can move it?
- How do I change the width of the exp bar?

Thank you for helping. I know I am requesting dead simple stuff, but I am trying to learn.
  Reply With Quote
02-09-12, 05:35 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
1. Type "/fstack".
2. Move the mouse cursor over the experience bar.
3. Look in the Frame Stack window to find the name of the experience bar frame.
4. Type "/fstack" again to hide the Frame Stack window.
5. Move the experience bar the same way you moved the other frames.
  Reply With Quote
02-10-12, 12:00 AM   #3
laukond
A Black Drake
Join Date: Dec 2011
Posts: 87
Originally Posted by Phanx View Post
1. Type "/fstack".
2. Move the mouse cursor over the experience bar.
3. Look in the Frame Stack window to find the name of the experience bar frame.
4. Type "/fstack" again to hide the Frame Stack window.
5. Move the experience bar the same way you moved the other frames.
I tried that, but wherever I move the exp bar, the mainbar, buttonleft/right, microbuttons and bag bar follows. I will post a screenshot when I get home, so you can see what I mean.
  Reply With Quote
02-10-12, 01:38 AM   #4
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
You need to use "/fstack" to get the name of the experience bar. Then, ClearAllPoints() on the frame which is attached to that bar (since you now know its name) and re-anchor it to UIParent.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
02-10-12, 01:43 AM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
According to Blizzard's UI code, the name of the XP bar is "MainMenuExpBar", and nothing (at least, nothing else defined in that file) is parented to it, or anchored relative to it, so this should work:
Code:
MainMenuExpBar:ClearAllPoints()
MainMenuExpBar:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
For good measure, you can also explicitly set the position relative to UIParent for the other frames:
Code:
MultiBarBottomRight:ClearAllPoints()
MultiBarBottomRight:SetPoint("BOTTOM", UIParent, "BOTTOM", -254, 100)

MainMenuBar:ClearAllPoints()
MainMenuBar:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 50, 0)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Move experience bar and change the width of it


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