WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Addon Request: Disabling or Hiding Appearance Tab. (https://www.wowinterface.com/forums/showthread.php?t=55899)

Nakama 12-05-17 08:21 AM

Addon Request: Disabling or Hiding Appearance Tab.
 
Hi. Just wondering if anyone can help me achieve this. I am not a big fan of the new appearance tab system and preferred the old school method of using the Mogit addon to plan and see what I have collected and not collected. Is there a way I can disable the appearance tab or at least hide it completely?

Help would be much appreciated! :D

briskman3000 12-05-17 01:27 PM

Replied to your pm, i will look into adding it to the other addon that i made for you.

briskman3000 12-06-17 08:19 PM

So I've run into a problem trying to get this to work. The appearance tab is called "CollectionsJournalTab5".

It appears that, that particular variable is not declared in the UI until after you either open the Collections Journal, so until you actually open the panel, I can not set the frame hidden via:

Lua Code:
  1. CollectionsJournalTab5:SetScript("OnEvent", nil)
  2. CollectionsJournalTab5:Hide()

There is no event fired when you open the overall collections frame, at least that I saw in the event trace, there is an event fired when you change to the appearance tab, but since you don't want to even see that tab, that event is useless. The same event fires when you open the xmog vendor, but again that is kind of useless.

If anyone has any ideas on how to overcome this it would be appreciated.

Seerah 12-06-17 08:32 PM

Hook the OnShow of the Collections Journal.

briskman3000 12-06-17 10:27 PM

Took me a minute to figure out how in the hell to get it right, but this seems to work, at least in my testing:

Lua Code:
  1. --Hide the Appearance tab function
  2. local function hideapptab(self)
  3.     CollectionsJournalTab5:SetScript("OnEvent", nil)
  4.     CollectionsJournalTab5:Hide()
  5. end
  6.  
  7. function events:ADDON_LOADED(...)
  8.     if IsAddOnLoaded("Blizzard_Collections") then
  9.         hideapptab(self)
  10.     end
  11. end

Not exactly hooking the OnShow, but it accomplishes the same end result from what I can tell.

briskman3000 12-07-17 06:47 PM

Added this functionality to the new release of xmogsethide


All times are GMT -6. The time now is 08:46 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI