raid-compact-layout: add custom compact layout

This commit is contained in:
shagu
2025-04-06 17:56:08 +02:00
parent ba9afa97bf
commit 1f77e9d6e1
2 changed files with 66 additions and 0 deletions
+1
View File
@@ -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
+65
View File
@@ -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