Since I wanted to adjust the Blizzard default UI (in Classic Wow) to my liking, I created an addon in order to move the position of the player debuffs. To be more specific I wanted to achieve the following two things:
The player debuffs should appear at the center of the screen while the player buffs stay at their default position in the top right corner.
The alignment of the player debuffs should be centered. So instead of having a fixed anchor from which the debuffs grow to the left or to the right, I want to have a dynamic anchor that adjusts depending on the amount of debuffs. My goal is that all the debuffs combined are always perfectly centered.
Here is what I did:
Basically I copy+pasted some of the code of BlizzardInterfaceCode\Interface\FrameXML\BuffFrame into my addon and adjusted some numbers and anchors. It worked out partially. The debuffs are at the center of the screen, as I wanted it. The alignment-part however did not work. As it is now the anchor is fixed in the center from where the debuffs grow to the right. I think there might be a problem with "DEBUFF_ACTUAL_DISPLAY" in line 19 of my lua code but I'm unable to fix it.
It goes without saying that I have no idea of what I'm doing. If there is a more elegant way to achieve what I want, I'd be eager to hear. I really appreciate any help. Thanks in advance!
function DebuffButton_UpdateAnchors(buttonName, index)
local numBuffs = BUFF_ACTUAL_DISPLAY + BuffFrame.numEnchants;