Not sure where I found this but I've been using it for the last few months in various layouts and it seems to work fairly well.
Replace YourLayout with your layout name (who would've thought...)
Lua Code:
local testui = TestUI or function() end
TestUI = function( msg )
if( msg == "uf" or msg == "unitframes" ) then
oUF_YourLayoutTarget:Show(); oUF_YourLayoutTarget.Hide = function() end; oUF_YourLayoutTarget.unit = "player"
elseif( msg == "boss" or msg == "b" ) then
oUF_YourLayoutBoss1:Show(); oUF_YourLayoutBoss1.Hide = function() end; oUF_YourLayoutBoss1.unit = "player"
oUF_YourLayoutBoss2:Show(); oUF_YourLayoutBoss2.Hide = function() end; oUF_YourLayoutBoss2.unit = "player"
oUF_YourLayoutBoss3:Show(); oUF_YourLayoutBoss3.Hide = function() end; oUF_YourLayoutBoss3.unit = "player"
elseif( msg == "buffs" ) then
UnitAura = function()
return 139, "Rank 1", "Interface\\Icons\\Spell_Holy_Penance", 1, "Magic", 0, 0, "player"
end
if( oUF ) then
for i, v in pairs( oUF.units ) do
if( v.UNIT_AURA ) then
v:UNIT_AURA( "UNIT_AURA", v.unit )
end
end
end
end
end
SlashCmdList.TestUI = TestUI
SLASH_TestUI1 = "/testui"