I quite like the blizzard raid frames (compact unit frames) over other unitframe addons. I'd like to do minor tweaks like changing the size of the buffs and the number of buffs or debuffs. Is it possible?
I'm currently taking a look at the frameXML files (CompactUnitFrames.lua) and I'm have doubts on how and what can I change things from it (expecially the secure hook thing). Can you shed me some light?
For example, buff size is set within
Code:
function DefaultCompactUnitFrameSetup(frame)
...
local buffSize = 11 * componentScale;
...
frame.buffFrames[i]:SetSize(buffSize, buffSize);
- - - Updated - - -
Oops
Using the secure hook I made it through changing buffs' size!
Code:
local NATIVE_UNIT_FRAME_HEIGHT = 36;
local NATIVE_UNIT_FRAME_WIDTH = 72;
local function postHook(...)
local frame = ...;
local options = DefaultCompactUnitFrameSetupOptions;
local componentScale = min(options.height / NATIVE_UNIT_FRAME_HEIGHT, options.width / NATIVE_UNIT_FRAME_WIDTH);
local buffSize = 15 * componentScale;
for i=1, #frame.buffFrames do
frame.buffFrames[i]:SetSize(buffSize, buffSize);
end
end
hooksecurefunc("DefaultCompactUnitFrameSetup", postHook);