Thread Tools Display Modes
05-17-18, 11:07 AM   #1
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
The bags bar gets repositioned at any time. Even during combat. I tried making it so it only does it out of combat. But sometimes the whole bar shrinks.

You have to call SetScale() in the function. But all the code is protected the main bar and bags bar.

For some reason if the bags bar is moved to the left side. Blizzard has code that will set the scale really small on the main bar.

Someone must know how to work around this?
  Reply With Quote
05-17-18, 02:26 PM   #2
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Originally Posted by galvin View Post
For some reason if the bags bar is moved to the left side. Blizzard has code that will set the scale really small on the main bar.

Someone must know how to work around this?
Lua Code:
  1. local availableSpace = MicroButtonAndBagsBar:GetLeft() - 16;
  2. scale = availableSpace / width;
  3. self:SetScale(scale);

It's in the quoted code. If the leftmost point of the microbar is on the left side of the rightmost point of the right gryphon, the bar will scale down, probably in a weird way since it's not expecting the negative offset to be that high. It's not "for some reason", it's because they're not expecting you to move the microbar to the left side.

Having that said, this piece of code isn't really top notch imo. They can solve this in a better way, and while beta is still on-going, maybe you should just ask Blizzard for a less hacky way to evaluate whether the two bars overlap.

Isn't it really just as easy as taking the space between the leftmost point of the left gryphon and the rightmost point of the right gryphon, adding it together with the width of the microbar and checking if it's the correct fraction of UIParent's total width? That way you would be able to put the microbar on the left side with ease.
__________________

Last edited by MunkDev : 05-17-18 at 02:34 PM.
  Reply With Quote

WoWInterface » PTR » PTR General Discussion » BfA - How can the bag bar be moved?


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