Lua Code:
local UnitAffectingCombat, InCombatLockdown = UnitAffectingCombat, InCombatLockdown
local function hide(self)
if TipBeGone.CombatOnly then
if (UnitAffectingCombat("player") or UnitAffectingCombat("pet") or InCombatLockdown()) then
self:Hide()
end
else
self:Hide()
end
end
local function thide(self)
hide(GameTooltip);
end
-- Hide tooltips for actions, pet actions and shapeshift
if TipBeGone.ActionBar then
hooksecurefunc(GameTooltip, "SetAction", hide);
end
if TipBeGone.PetActionBar then
hooksecurefunc(GameTooltip, "SetPetAction", hide);
end
if TipBeGone.ShapeShiftBar then
hooksecurefunc(GameTooltip, "SetShapeshift", hide);
end
-- Hide tooltips for inventory items (paper doll and inspect)
if TipBeGone.Inventory then
hooksecurefunc(GameTooltip, "SetInventoryItem", hide);
end
-- Hide tooltips on micro buttons
if TipBeGone.MainBar then
CharacterMicroButton:HookScript("OnEnter", thide)
SpellbookMicroButton:HookScript("OnEnter", thide)
TalentMicroButton:HookScript("OnEnter", thide)
QuestLogMicroButton:HookScript("OnEnter", thide)
MainMenuMicroButton:HookScript("OnEnter", thide)
PVPMicroButton:HookScript("OnEnter", thide)
SocialsMicroButton:HookScript("OnEnter", thide)
GuildMicroButton:HookScript("OnEnter", thide) -- Cataclysm
LFDMicroButton:HookScript("OnEnter", thide)
HelpMicroButton:HookScript("OnEnter", thide)
AchievementMicroButton:HookScript("OnEnter", thide)
end
-- Hide tooltips on bag and keyring buttons
if TipBeGone.Bags then
MainMenuBarBackpackButton:HookScript("OnEnter", thide);
CharacterBag0Slot:HookScript("OnEnter", thide);
CharacterBag1Slot:HookScript("OnEnter", thide);
CharacterBag2Slot:HookScript("OnEnter", thide);
CharacterBag3Slot:HookScript("OnEnter", thide);
KeyRingButton:HookScript("OnEnter", thide);
end
Maybe something like this...