View Single Post
10-15-20, 10:32 PM   #2
Kuberman
A Defias Bandit
Join Date: Oct 2020
Posts: 2
Problem solved

I managed to solve the problem. Much of the code that I copied was needlessly complicated and very difficult for me to understand (probably due to its 2009 release date. Yikes!). I decided to bite the bullet and rewrite the code in a way that I can understand. It's far from perfect, but still more elegant than the previous solution. Here it is, if this helps anyone else.

Lua Code:
  1. local _G = _G
  2.  
  3. for i = 12, 1, -1 do
  4.     local b = _G["MultiBarLeftButton"..i]
  5.     local f = i > 1 and "MultiBarLeftButton"..i-1 or "MultiBarLeft"
  6.  
  7.     b:ClearAllPoints()
  8.     b:SetPoint("LEFT", f, "RIGHT", 6, 0)
  9. end
  10.  
  11. MultiBarLeftButton1:ClearAllPoints()
  12. MultiBarLeftButton1:SetPoint("BOTTOMLEFT", "MultiBarBottomLeftButton1", "TOPLEFT", 0, 6)
  13. StanceButton1:ClearAllPoints()
  14. StanceButton1:SetPoint("RIGHT", "MultiBarBottomLeftButton1", "TOPLEFT", -6, 4)
  Reply With Quote