View Single Post
03-30-15, 12:49 AM   #3
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Lua Code:
  1. local UnitAffectingCombat, InCombatLockdown = UnitAffectingCombat, InCombatLockdown
  2.  
  3. local function hide(self)
  4.     if TipBeGone.CombatOnly then
  5.         if (UnitAffectingCombat("player") or UnitAffectingCombat("pet") or InCombatLockdown()) then
  6.             self:Hide()
  7.         end
  8.     else
  9.         self:Hide()
  10.     end
  11. end
  12.  
  13. local function thide(self)
  14.     hide(GameTooltip);
  15. end
  16.  
  17. -- Hide tooltips for actions, pet actions and shapeshift
  18. if TipBeGone.ActionBar then
  19.     hooksecurefunc(GameTooltip, "SetAction", hide);
  20. end
  21. if TipBeGone.PetActionBar then
  22.     hooksecurefunc(GameTooltip, "SetPetAction", hide);
  23. end
  24. if TipBeGone.ShapeShiftBar then
  25.     hooksecurefunc(GameTooltip, "SetShapeshift", hide);
  26. end
  27.  
  28. -- Hide tooltips for inventory items (paper doll and inspect)
  29. if TipBeGone.Inventory then
  30.     hooksecurefunc(GameTooltip, "SetInventoryItem", hide);
  31. end
  32.  
  33. -- Hide tooltips on micro buttons
  34. if TipBeGone.MainBar then
  35.     CharacterMicroButton:HookScript("OnEnter", thide)
  36.     SpellbookMicroButton:HookScript("OnEnter", thide)
  37.     TalentMicroButton:HookScript("OnEnter", thide)
  38.     QuestLogMicroButton:HookScript("OnEnter", thide)
  39.     MainMenuMicroButton:HookScript("OnEnter", thide)
  40.     PVPMicroButton:HookScript("OnEnter", thide)
  41.     SocialsMicroButton:HookScript("OnEnter", thide)
  42.     GuildMicroButton:HookScript("OnEnter", thide) -- Cataclysm
  43.     LFDMicroButton:HookScript("OnEnter", thide)
  44.     HelpMicroButton:HookScript("OnEnter", thide)
  45.     AchievementMicroButton:HookScript("OnEnter", thide)
  46. end
  47.  
  48. -- Hide tooltips on bag and keyring buttons
  49. if TipBeGone.Bags then
  50.     MainMenuBarBackpackButton:HookScript("OnEnter", thide);
  51.     CharacterBag0Slot:HookScript("OnEnter", thide);
  52.     CharacterBag1Slot:HookScript("OnEnter", thide);
  53.     CharacterBag2Slot:HookScript("OnEnter", thide);
  54.     CharacterBag3Slot:HookScript("OnEnter", thide);
  55.     KeyRingButton:HookScript("OnEnter", thide);
  56. end
Maybe something like this...
  Reply With Quote