View Single Post
09-25-14, 01:14 AM   #2
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 648
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:
  1. local testui = TestUI or function() end
  2. TestUI = function( msg )
  3.     if( msg == "uf" or msg == "unitframes" ) then
  4.         oUF_YourLayoutTarget:Show(); oUF_YourLayoutTarget.Hide = function() end; oUF_YourLayoutTarget.unit = "player"
  5.     elseif( msg == "boss" or msg == "b" ) then
  6.         oUF_YourLayoutBoss1:Show(); oUF_YourLayoutBoss1.Hide = function() end; oUF_YourLayoutBoss1.unit = "player"
  7.         oUF_YourLayoutBoss2:Show(); oUF_YourLayoutBoss2.Hide = function() end; oUF_YourLayoutBoss2.unit = "player"
  8.         oUF_YourLayoutBoss3:Show(); oUF_YourLayoutBoss3.Hide = function() end; oUF_YourLayoutBoss3.unit = "player"
  9.     elseif( msg == "buffs" ) then
  10.         UnitAura = function()
  11.             return 139, "Rank 1", "Interface\\Icons\\Spell_Holy_Penance", 1, "Magic", 0, 0, "player"
  12.         end
  13.  
  14.         if( oUF ) then
  15.             for i, v in pairs( oUF.units ) do
  16.                 if( v.UNIT_AURA ) then
  17.                     v:UNIT_AURA( "UNIT_AURA", v.unit )
  18.                 end
  19.             end
  20.         end
  21.     end
  22. end
  23. SlashCmdList.TestUI = TestUI
  24. SLASH_TestUI1 = "/testui"
__________________
All I see is strobe lights blinding me in my hindsight.
  Reply With Quote