Thread Tools Display Modes
03-20-14, 02:43 PM   #1
JDoubleU00
A Firelord
 
JDoubleU00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 463
XP/Rep Addon

I'm looking for an addon that does both XP and Rep. I'm currently using XPBarnone. It does not hide in combat, but I like the layout. I have posted a question to the author if it can be made to hide in combat, but I have not gotten a reply. Any suggestions? My goal is something that is minimally invasive on the screen.

Thanks.
  Reply With Quote
03-20-14, 03:47 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I can't believe there's no generic "hide stuff in combat" addon, but this should work:

1. Type "/fstack" and put the cursor over the addon's frame. Take note of its name, as shown in the Frame Stack tooltip. Type "/fstack" again to hide the tooltip.

2. Insert the name you found into this code:

Code:
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_REGEN_ENABLED")
f:RegisterEvent("PLAYER_REGEN_DISABLED")
f:SetScript("OnEvent", function(self, event)
     NameOfTheFrameYouWantToHide:SetShown(event == "PLAYER_REGEN_ENABLED")
end)
If there are multiple frames you want to hide, use this version instead:

Code:
local framesToHide = {
     "NameOfTheFrame",
     "NameOfAnotherFrame",
     "SomeOtherFrame",
     "YetMoreFrames",
}

local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_REGEN_ENABLED")
f:RegisterEvent("PLAYER_REGEN_DISABLED")
f:SetScript("OnEvent", function(self, event)
     local show = event == "PLAYER_REGEN_ENABLED"
     for i = 1, #framesToHide
          local frame = _G[framesToHide[i]]
          if frame then
               frame:SetShown(show)
          end
     end
end)
If you need help turning the above code into an addon, copy and paste it into this page:
http://addon.bool.no/
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
03-20-14, 06:27 PM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
http://www.wowinterface.com/download...icUIHider.html ?
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
03-20-14, 06:50 PM   #4
JDoubleU00
A Firelord
 
JDoubleU00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 463
Has anyone told you two you are awesome?
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » XP/Rep Addon


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off