diff --git a/ouf.lua b/ouf.lua index 879165c8..0732d63b 100644 --- a/ouf.lua +++ b/ouf.lua @@ -621,7 +621,7 @@ do (string?) * visibility - macro conditional(s) which define when to display the header (string). * ... - further argument pairs. Consult [Group Headers](https://warcraft.wiki.gg/wiki/SecureGroupHeaderTemplate) - for possible values. + for possible values. If preferred, the attributes can be an associative table. In addition to the standard group headers, oUF implements some of its own attributes. These can be supplied by the layout, but are optional. PingableUnitFrameTemplate is inherited for Ping support. @@ -640,10 +640,19 @@ do local header = CreateFrame('Frame', name, PetBattleFrameHider, template) header:SetAttribute('template', 'SecureUnitButtonTemplate, SecureHandlerStateTemplate, SecureHandlerEnterLeaveTemplate, PingableUnitFrameTemplate') - for i = 1, select('#', ...), 2 do - local att, val = select(i, ...) - if(not att) then break end - header:SetAttribute(att, val) + + if(...) then + if(type((...)) == 'table') then + for att, val in next, (...) do + header:SetAttribute(att, val) + end + else + for i = 1, select('#', ...), 2 do + local att, val = select(i, ...) + if(not att) then break end + header:SetAttribute(att, val) + end + end end header.style = style