There's a lot of things that you have to be sure of before doing this. The reason you don't need to call the locals is because the function I posted is ripped right out of Blizzards UI structure.
One thing is, do you want to continue with the Temporary Enchants frame to be part of the BuffFrame? Same with Debuffs...do you want those in identical positions, just mirrored, as they originally come (below Buffs).
For instance, within the function:
Code:
if ( (index > 1) and (mod(index, BUFFS_PER_ROW) == 1) ) then
-- New row
if ( index == BUFFS_PER_ROW+1 ) then
buff:SetPoint("TOP", TempEnchant1, "BOTTOM", 0, -BUFF_ROW_SPACING);
else
buff:SetPoint("TOP", getglobal(buttonName..(index-BUFFS_PER_ROW)), "BOTTOM", 0, -BUFF_ROW_SPACING);
end
elseif ( index == 1 ) then
buff:SetPoint("TOPLEFT", BuffFrame, "TOPLEFT", 0, 0);
else
buff:SetPoint("LEFT", getglobal(buttonName..(index-1)), "RIGHT", 5, 0);
end
The
bold portion is for new rows that do not consist of the first anchoring of a buff. So anytime your BuffButton count exceeds that of the BUFF_PER_ROW value, this is what's directing the anchoring.
Code:
if ( (index > 1) and (mod(index, BUFFS_PER_ROW) == 1) ) then
-- New row
if ( index == BUFFS_PER_ROW+1 ) then
buff:SetPoint("TOP", TempEnchant1, "BOTTOM", 0, -BUFF_ROW_SPACING);
else
buff:SetPoint("TOP", getglobal(buttonName..(index-BUFFS_PER_ROW)), "BOTTOM", 0, -BUFF_ROW_SPACING);
end
elseif ( index == 1 ) then
buff:SetPoint("TOPLEFT", BuffFrame, "TOPLEFT", 0, 0);
else
buff:SetPoint("LEFT", getglobal(buttonName..(index-1)), "RIGHT", 5, 0);
end
In
bold is the "First" anchoring, which always is related to the BuffFrame itself. The last part indicates the "Growth" portion of the anchoring, meaning that (as is above) the "Left" side of the new button anchors to the "Right" side of the previous button (which indicates growth to the right).
You can change this however you need to, to build a custom growth system for the BuffButtons (and same with the Debuffs). Remember to move the entire BuffFrame to the location want as well.
It really all depends on what you want to do. If you want to take "exactly" what Blizzard defaults to the right side adjacent the Minimap, you simply need to reverse all the growth structure anchors for all the applicable frames. If you want to seperate them, this can be done simply by seperating them and using different anchor points in relation to where they're going to be seated in your UI.