diff --git a/ShaguTweaks-extras.toc b/ShaguTweaks-extras.toc index a3f7918..59347b9 100644 --- a/ShaguTweaks-extras.toc +++ b/ShaguTweaks-extras.toc @@ -40,6 +40,7 @@ mods\raid-combat-feedback.lua mods\raid-dispel-indicators.lua mods\raid-aggro-indicator.lua mods\raid-healing-predictions.lua +mods\raid-compact-layout.lua mods\raid-hide-party.lua # reduced actionbar size diff --git a/mods/raid-compact-layout.lua b/mods/raid-compact-layout.lua new file mode 100644 index 0000000..983aabd --- /dev/null +++ b/mods/raid-compact-layout.lua @@ -0,0 +1,65 @@ +local _G = ShaguTweaks.GetGlobalEnv() +local T = ShaguTweaks.T + +local module = ShaguTweaks:register({ + title = T["Use Compact Layout"], + description = T["Reduces the raid frame size and the displayed elements. As a healer, you should never use this layout."], + expansions = { ["vanilla"] = true, ["tbc"] = false }, + category = T["Raid Frames"], + maintainer = "@shagu (GitHub)", + enabled = nil, +}) + +module.enable = function(self) + -- overwrite config + ShaguTweaksRaidCluster.config.width = 64 + ShaguTweaksRaidCluster.config.height = 12 + ShaguTweaksRaidCluster.config.rows = 40 + + -- disable mana bars + ShaguTweaks.UnitFrame_NewComponent('compact layout', { + events = { }, + create = function(frame) + -- hide mana bar + frame.mana:Hide() + + -- move player text to healthbar + frame.text:SetParent(frame.bar) + frame.icon:SetParent(frame.bar) + -- move raid icon + frame.icon:ClearAllPoints() + frame.icon:SetPoint("LEFT", frame.bar, "LEFT", 0, 0) + + end, + update = function(frame, event) + -- disable all second lines + frame.info = nil + end + }) + + -- wait for the game to be loaded + local delay = CreateFrame("Frame") + delay:SetScript("OnUpdate", function() + -- modify group headers + for i=1, 8 do + if ShaguTweaksRaidHeaders[i] then + -- read raid anchor per group header + local _, anchor = ShaguTweaksRaidHeaders[i]:GetPoint() + + -- remove background and move to the left + --ShaguTweaksRaidHeaders[i]:SetBackdrop(nil) + ShaguTweaksRaidHeaders[i]:ClearAllPoints() + ShaguTweaksRaidHeaders[i]:SetPoint("LEFT", anchor, "LEFT", -6, 6) + ShaguTweaksRaidHeaders[i]:SetWidth(16) + ShaguTweaksRaidHeaders[i]:SetHeight(16) + --ShaguTweaksRaidHeaders[i].text:SetTextColor(.5,.5,.5,1) + ShaguTweaksRaidHeaders[i].text:SetText(i) + ShaguTweaksRaidHeaders[i]:SetAlpha(.75) + end + end + + -- disable delay + this:Hide() + end) + +end