Quantcast

Remove tooltip option

p3lim [09-06-10 - 20:34]
Remove tooltip option
- The layout should be in charge of this
Filename
oUF_Experience.lua
diff --git a/oUF_Experience.lua b/oUF_Experience.lua
index 7db410c..4db3d5d 100644
--- a/oUF_Experience.lua
+++ b/oUF_Experience.lua
@@ -12,23 +12,6 @@ local function GetXP(unit)
 	end
 end

-local function SetTooltip(self)
-	local unit = self:GetParent().unit
-	local min, max = GetXP(unit)
-
-	local bars = unit == 'pet' and 6 or 20
-
-	GameTooltip:SetOwner(self, 'ANCHOR_BOTTOMRIGHT', 5, -5)
-	GameTooltip:AddLine(string.format('XP: %d / %d (%d%% - %d bars)', min, max, min/max * 100, bars))
-	GameTooltip:AddLine(string.format('Remaining: %d (%d%% - %d bars)', max - min, (max - min) / max * 100, bars * (max - min) / max))
-
-	if(self.rested) then
-		GameTooltip:AddLine(string.format('|cff0090ffRested: +%d (%d%%)', self.rested, self.rested / max * 100))
-	end
-
-	GameTooltip:Show()
-end
-
 local function Update(self, event, owner)
 	if(event == 'UNIT_PET' and owner ~= 'player') then return end

@@ -95,12 +78,6 @@ local function Enable(self, unit)
 			self:RegisterEvent('UNIT_PET_EXPERIENCE', Update)
 		end

-		if(not experience.noTooltip) then
-			experience:EnableMouse()
-			experience:HookScript('OnLeave', GameTooltip_Hide)
-			experience:HookScript('OnEnter', SetTooltip)
-		end
-
 		if(not experience:GetStatusBarTexture()) then
 			experience:SetStatusBarTexture([=[Interface\TargetingFrame\UI-StatusBar]=])
 		end