View Single Post
07-19-12, 12:45 PM   #5
ballagarba
A Fallenroot Satyr
 
ballagarba's Avatar
Join Date: Mar 2009
Posts: 22
Originally Posted by Lombra View Post
Can you not move the entire StanceBar instead?
Hmm, came up with this and it actually seems to work nicely

lua Code:
  1. if (GetNumShapeshiftForms() == 1) then
  2.     StanceBarFrame:SetMovable(true)
  3.     StanceBarFrame:SetUserPlaced(true)
  4.     StanceButton1:HookScript('OnDragStop', function(self)
  5.         local point, relativeTo, relativePoint, xOffset, yOffset = self:GetPoint()
  6.         StanceBarFrame:ClearAllPoints()
  7.         -- 12 and 3 is to offset for StanceButton1's relative position towards StanceBarFrame
  8.         StanceBarFrame:SetPoint(point, relativeTo, relativePoint, xOffset - 12, yOffset - 3)
  9.     end)
  10. end