Thank you very much Haleth
But now I have an another problem. My Buffs/Debuffs are hidden if it is only 1 Buff/Debuff.
Here the code:
Code:
local _G = _G
local function buffstyle()
for i = 1, BUFF_ACTUAL_DISPLAY do
_G["BuffButton"..i]:SetHeight(sniffles.btsize)
_G["BuffButton"..i]:SetWidth(sniffles.btsize)
CreateBorder(_G["BuffButton"..i], 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
_G["BuffButton"..i.."Count"]:SetFont(sniffles.font, sniffles.fsize, sniffles.ftags)
_G["BuffButton"..i.."Duration"]:SetFont(sniffles.font, sniffles.fsize, sniffles.ftags)
_G["BuffButton"..i.."Duration"]:SetPoint(sniffles.durpoint[1], _G["BuffButton"..i], sniffles.durpoint[2], sniffles.durpoint[3])
if _G["BuffButton"..i.."Border"] then _G["BuffButton"..i.."Border"]:Hide() end
_G["BuffButton1"]:ClearAllPoints()
_G["BuffButton1"]:SetPoint(sniffles.buffspoint[1], sniffles.buffspoint[2], sniffles.buffspoint[3], sniffles.buffspoint[4])
_G["BuffButton"..i]:ClearAllPoints()
_G["BuffButton"..i]:SetPoint("LEFT", _G["BuffButton"..i-1], (sniffles.space-sniffles.btsize), 0)
end
for a = 1, 3 do
_G["TempEnchant"..a]:SetWidth(sniffles.Wbtsize)
_G["TempEnchant"..a]:SetHeight(sniffles.Wbtsize)
_G["TempEnchant"..a.."Count"]:SetFont(sniffles.font, sniffles.fsize, sniffles.ftags)
_G["TempEnchant"..a.."Duration"]:SetFont(sniffles.font, sniffles.fsize, sniffles.ftags)
_G["TempEnchant"..a.."Duration"]:SetPoint(sniffles.Wdurpoint[1], _G["TempEnchant"..a], sniffles.Wdurpoint[2], sniffles.Wdurpoint[3])
CreateBorder(_G["TempEnchant"..a], 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
ColorBorder(_G["TempEnchant"..a], 153/255, 50/255, 204/255)
if _G["TempEnchant"..a.."Border"] then _G["TempEnchant"..a.."Border"]:Hide() end
_G["TempEnchant1"]:ClearAllPoints()
_G["TempEnchant1"]:SetPoint(sniffles.Wbuffspoint[1], sniffles.Wbuffspoint[2], sniffles.Wbuffspoint[3], sniffles.Wbuffspoint[4])
_G["TempEnchant"..a]:ClearAllPoints()
_G["TempEnchant"..a]:SetPoint("LEFT", _G["TempEnchant"..a-1], (sniffles.space-sniffles.Wbtsize), 0)
end
for k = 1, DEBUFF_ACTUAL_DISPLAY do
_G["DebuffButton"..k]:SetWidth(sniffles.Dbtsize)
_G["DebuffButton"..k]:SetHeight(sniffles.Dbtsize)
CreateBorder(_G["DebuffButton"..k], 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
ColorBorder(_G["DebuffButton"..k], 1, 0, 0)
_G["DebuffButton"..k.."Count"]:SetFont(sniffles.font, sniffles.fsize, sniffles.ftags)
_G["DebuffButton"..k.."Duration"]:SetFont(sniffles.font, sniffles.fsize, sniffles.ftags)
_G["DebuffButton"..k.."Duration"]:SetPoint(sniffles.Ddurpoint[1], _G["DebuffButton"..k], sniffles.Ddurpoint[2], sniffles.Ddurpoint[3])
if _G["DebuffButton"..k.."Border"] then _G["DebuffButton"..k.."Border"]:Hide() end
_G["DebuffButton1"]:ClearAllPoints()
_G["DebuffButton1"]:SetPoint(sniffles.Dbuffspoint[1], sniffles.Dbuffspoint[2], sniffles.Dbuffspoint[3], sniffles.Dbuffspoint[4])
_G["DebuffButton"..k]:ClearAllPoints()
_G["DebuffButton"..k]:SetPoint("LEFT", _G["DebuffButton"..k-1], (sniffles.space-sniffles.Dbtsize), 0)
end
end
hooksecurefunc("AuraButton_Update", buffstyle)
SetCVar("consolidateBuffs", 0)
InterfaceOptionsBuffsPanelConsolidateBuffs:Hide()