View Single Post
02-22-11, 06:21 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I use the global actionbar name and the IsShown() widget.

What I use for oUF_Diablo
lua Code:
  1. --code
  2.       if MultiBarBottomRight:IsShown() then
  3.         t:SetTexture("Interface\\AddOns\\rTextures\\bar3")
  4.       elseif MultiBarBottomLeft:IsShown() then
  5.         t:SetTexture("Interface\\AddOns\\rTextures\\bar2")
  6.       else
  7.         t:SetTexture("Interface\\AddOns\\rTextures\\bar1")
  8.       end
  9.       MultiBarBottomRight:HookScript("OnShow", function() t:SetTexture("Interface\\AddOns\\rTextures\\bar3") end)
  10.       MultiBarBottomRight:HookScript("OnHide", function() t:SetTexture("Interface\\AddOns\\rTextures\\bar2") end)
  11.       MultiBarBottomLeft:HookScript("OnShow", function() t:SetTexture("Interface\\AddOns\\rTextures\\bar2") end)
  12.       MultiBarBottomLeft:HookScript("OnHide", function() t:SetTexture("Interface\\AddOns\\rTextures\\bar1") end)
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 02-22-11 at 06:23 AM.
  Reply With Quote