Quantcast

Datatext stuff

Alex [01-19-13 - 05:23]
Datatext stuff
Filename
ElvUI_SLE/modules/datatexts/time.lua
ElvUI_SLE/modules/datatexts/version.lua
diff --git a/ElvUI_SLE/modules/datatexts/time.lua b/ElvUI_SLE/modules/datatexts/time.lua
index f9607f5..059adc4 100644
--- a/ElvUI_SLE/modules/datatexts/time.lua
+++ b/ElvUI_SLE/modules/datatexts/time.lua
@@ -108,7 +108,7 @@ local function Click()
 end

 local function OnLeave(self)
-	GameTooltip:Hide();
+	DT.tooltip:Hide();
 	enteredFrame = false;
 end

@@ -116,7 +116,7 @@ local function OnEnter(self)
 	DT:SetupTooltip(self)
 	enteredFrame = true;

-	GameTooltip:AddLine(VOICE_CHAT_BATTLEGROUND);
+	DT.tooltip:AddLine(VOICE_CHAT_BATTLEGROUND);
 	for i = 1, GetNumWorldPVPAreas() do
 		_, localizedName, isActive, canQueue, startTime, canEnter = GetWorldPVPAreaInfo(i)
 		if canEnter then
@@ -132,7 +132,7 @@ local function OnEnter(self)
 					startTime = format(timerShortFormat, m, s)
 				end
 			end
-			GameTooltip:AddDoubleLine(format(formatBattleGroundInfo, localizedName), startTime, 1, 1, 1, lockoutColorNormal.r, lockoutColorNormal.g, lockoutColorNormal.b)
+			DT.tooltip:AddDoubleLine(format(formatBattleGroundInfo, localizedName), startTime, 1, 1, 1, lockoutColorNormal.r, lockoutColorNormal.g, lockoutColorNormal.b)
 		end
 	end

@@ -140,24 +140,24 @@ local function OnEnter(self)
 		--LFR lockout text
 		local lvl = UnitLevel("player")
 		local ilvl = GetAverageItemLevel()
-		GameTooltip:AddLine(" ")
+		DT.tooltip:AddLine(" ")
 		if lvl == 85 and ilvl >= 372 then
 			DT:DragonSoul(416, 417)
 		elseif lvl == 90 then
 			if ilvl >= 460 then
 				DT:Mogushan(527, 528)
-				GameTooltip:AddLine(" ")
+				DT.tooltip:AddLine(" ")
 			end
 			if ilvl >= 470 then
 				DT:HoF(529, 530)
-				GameTooltip:AddLine(" ")
+				DT.tooltip:AddLine(" ")
 				DT:ToES(526)
 			end
 			if ilvl < 460 then
-				GameTooltip:AddLine(L["No LFR is available for your lever/gear."])
+				DT.tooltip:AddLine(L["No LFR is available for your lever/gear."])
 			end
 		else
-			GameTooltip:AddLine(L["No LFR is available for your lever/gear."])
+			DT.tooltip:AddLine(L["No LFR is available for your lever/gear."])
 		end
 		--LFR lockout end
 	end
@@ -168,39 +168,39 @@ local function OnEnter(self)
 		if isRaid and (locked or extended) and name then
 			local tr,tg,tb,diff
 			if not oneraid then
-				GameTooltip:AddLine(" ")
-				GameTooltip:AddLine(L["Saved Raid(s)"])
+				DT.tooltip:AddLine(" ")
+				DT.tooltip:AddLine(L["Saved Raid(s)"])
 				oneraid = true
 			end
 			if extended then lockoutColor = lockoutColorExtended else lockoutColor = lockoutColorNormal end

 			if (numEncounters and numEncounters > 0) and (encounterProgress and encounterProgress > 0) then
-				GameTooltip:AddDoubleLine(format(lockoutInfoFormat, maxPlayers, (difficulty:match("Normal") and "N" or "H"), name, encounterProgress, numEncounters), formatResetTime(reset), 1,1,1, lockoutColor.r,lockoutColor.g,lockoutColor.b)
+				DT.tooltip:AddDoubleLine(format(lockoutInfoFormat, maxPlayers, (difficulty:match("Normal") and "N" or "H"), name, encounterProgress, numEncounters), formatResetTime(reset), 1,1,1, lockoutColor.r,lockoutColor.g,lockoutColor.b)
 			else
-				GameTooltip:AddDoubleLine(format(lockoutInfoFormatNoEnc, maxPlayers, (difficulty:match("Normal") and "N" or "H"), name), formatResetTime(reset), 1,1,1, lockoutColor.r,lockoutColor.g,lockoutColor.b)
+				DT.tooltip:AddDoubleLine(format(lockoutInfoFormatNoEnc, maxPlayers, (difficulty:match("Normal") and "N" or "H"), name), formatResetTime(reset), 1,1,1, lockoutColor.r,lockoutColor.g,lockoutColor.b)
 			end
 		end
 	end

-	GameTooltip:AddLine(" ")
-	GameTooltip:AddLine(L["World Boss(s)"])
-	GameTooltip:AddDoubleLine(L['Sha of Anger']..':', quests[32099] and L['Defeated'] or L['Undefeated'], 1, 1, 1, 0.8, 0.8, 0.8)
-	GameTooltip:AddDoubleLine(L['Galleon']..':', quests[32098] and L['Defeated'] or L['Undefeated'], 1, 1, 1, 0.8, 0.8, 0.8)
+	DT.tooltip:AddLine(" ")
+	DT.tooltip:AddLine(L["World Boss(s)"])
+	DT.tooltip:AddDoubleLine(L['Sha of Anger']..':', quests[32099] and L['Defeated'] or L['Undefeated'], 1, 1, 1, 0.8, 0.8, 0.8)
+	DT.tooltip:AddDoubleLine(L['Galleon']..':', quests[32098] and L['Defeated'] or L['Undefeated'], 1, 1, 1, 0.8, 0.8, 0.8)


 	local timeText
 	local Hr, Min, AmPm = CalculateTimeValues(true)

-	GameTooltip:AddLine(" ")
+	DT.tooltip:AddLine(" ")
 	if AmPm == -1 then
-		GameTooltip:AddDoubleLine(E.db.datatexts.localtime and TIMEMANAGER_TOOLTIP_REALMTIME or TIMEMANAGER_TOOLTIP_LOCALTIME,
+		DT.tooltip:AddDoubleLine(E.db.datatexts.localtime and TIMEMANAGER_TOOLTIP_REALMTIME or TIMEMANAGER_TOOLTIP_LOCALTIME,
 			format(europeDisplayFormat_nocolor, Hr, Min), 1, 1, 1, lockoutColorNormal.r, lockoutColorNormal.g, lockoutColorNormal.b)
 	else
-		GameTooltip:AddDoubleLine(E.db.datatexts.localtime and TIMEMANAGER_TOOLTIP_REALMTIME or TIMEMANAGER_TOOLTIP_LOCALTIME,
+		DT.tooltip:AddDoubleLine(E.db.datatexts.localtime and TIMEMANAGER_TOOLTIP_REALMTIME or TIMEMANAGER_TOOLTIP_LOCALTIME,
 			format(ukDisplayFormat_nocolor, Hr, Min, APM[AmPm]), 1, 1, 1, lockoutColorNormal.r, lockoutColorNormal.g, lockoutColorNormal.b)
 	end

-	GameTooltip:Show()
+	DT.tooltip:Show()
 end

 local int = 3
diff --git a/ElvUI_SLE/modules/datatexts/version.lua b/ElvUI_SLE/modules/datatexts/version.lua
index 31246ac..ed299b0 100644
--- a/ElvUI_SLE/modules/datatexts/version.lua
+++ b/ElvUI_SLE/modules/datatexts/version.lua
@@ -20,12 +20,12 @@ end
 local function OnEnter(self)
 	DT:SetupTooltip(self)

-	GameTooltip:AddDoubleLine("ElvUI "..L["Version"]..format(": |cff99ff33%s|r",E.version))
-	GameTooltip:AddLine(L["SLE_AUTHOR_INFO"]..". "..L["Version"]..format(": |cff99ff33%s|r",SLE.version))
-	GameTooltip:AddLine(" ")
-	GameTooltip:AddLine(L['SLE_CONTACTS'])
+	DT.tooltip:AddDoubleLine("ElvUI "..L["Version"]..format(": |cff99ff33%s|r",E.version))
+	DT.tooltip:AddLine(L["SLE_AUTHOR_INFO"]..". "..L["Version"]..format(": |cff99ff33%s|r",SLE.version))
+	DT.tooltip:AddLine(" ")
+	DT.tooltip:AddLine(L['SLE_CONTACTS'])

-	GameTooltip:Show()
+	DT.tooltip:Show()
 end

 local function ValueColorUpdate(hex, r, g, b)