grouping first step

This commit is contained in:
Sumsebrum 2022-03-03 23:38:05 +01:00
parent 27573b7530
commit 907c64a864

View File

@ -15,6 +15,8 @@ local Classicon = Gladdy:NewModule("Class Icon", 81, {
classIconYOffset = 0,
classIconFrameStrata = "MEDIUM",
classIconFrameLevel = 5,
classIconGroup = false,
classIconGroupDirection = "RIGHT"
})
local classIconPath = "Interface\\Addons\\Gladdy\\Images\\Classes\\"
@ -133,6 +135,14 @@ function Classicon:UpdateFrame(unit)
Gladdy:SetPosition(classIcon, unit, "classIconXOffset", "classIconYOffset", Classicon:LegacySetPosition(classIcon, unit), Classicon)
if (Gladdy.db.classIconGroup) then
if (unit ~= "arena1") then
local previousUnit = "arena" .. string.gsub(unit, "arena", "") - 1
self.frames[unit]:ClearAllPoints()
self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0)
end
end
if (unit == "arena1") then
Gladdy:CreateMover(classIcon, "classIconXOffset", "classIconYOffset", L["Class Icon"],
{"TOPLEFT", "TOPLEFT"},