Commit 735f5f66 authored by Simpy's avatar Simpy 🐹

add missing dt headers for bg and time

parent e3362b0a
......@@ -51,6 +51,10 @@ end
function DT:BattlegroundStats()
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..BATTLEGROUND)
DT.tooltip:AddLine(" ")
local classColor = (_G.CUSTOM_CLASS_COLORS and _G.CUSTOM_CLASS_COLORS[E.myclass]) or _G.RAID_CLASS_COLORS[E.myclass]
local numStatInfo = GetNumBattlefieldStats()
if numStatInfo then
......
......@@ -29,6 +29,7 @@ local TIMEMANAGER_TOOLTIP_LOCALTIME = TIMEMANAGER_TOOLTIP_LOCALTIME
local TIMEMANAGER_TOOLTIP_REALMTIME = TIMEMANAGER_TOOLTIP_REALMTIME
local VOICE_CHAT_BATTLEGROUND = VOICE_CHAT_BATTLEGROUND
local WINTERGRASP_IN_PROGRESS = WINTERGRASP_IN_PROGRESS
local TIME_LABEL = TIME_LABEL:gsub(':$', '')
local WORLD_BOSSES_TEXT = RAID_INFO_WORLD_BOSS.."(s)"
local APM = { TIMEMANAGER_PM, TIMEMANAGER_AM }
......@@ -148,8 +149,10 @@ local function OnEnter(self)
end
end
local addedHeader = false
-- Header
DT.tooltip:AddLine(E.title..TIME_LABEL)
local addedHeader = false
for i = 1, GetNumWorldPVPAreas() do
local _, localizedName, isActive, _, startTime, canEnter = GetWorldPVPAreaInfo(i)
if canEnter then
......@@ -188,9 +191,7 @@ local function OnEnter(self)
end
if next(lockedInstances.raids) then
if DT.tooltip:NumLines() > 0 then
DT.tooltip:AddLine(" ")
end
DT.tooltip:AddLine(" ")
DT.tooltip:AddLine(L["Saved Raid(s)"])
sort(lockedInstances.raids, sortFunc)
......@@ -210,9 +211,7 @@ local function OnEnter(self)
end
if next(lockedInstances.dungeons) then
if DT.tooltip:NumLines() > 0 then
DT.tooltip:AddLine(" ")
end
DT.tooltip:AddLine(" ")
DT.tooltip:AddLine(L["Saved Dungeon(s)"])
sort(lockedInstances.dungeons, sortFunc)
......@@ -240,22 +239,19 @@ local function OnEnter(self)
sort(worldbossLockoutList, sortFunc)
for i = 1,#worldbossLockoutList do
local name, reset = unpack(worldbossLockoutList[i])
if(reset) then
if(not addedLine) then
if DT.tooltip:NumLines() > 0 then
DT.tooltip:AddLine(" ")
end
if reset then
if not addedLine then
DT.tooltip:AddLine(" ")
DT.tooltip:AddLine(WORLD_BOSSES_TEXT)
addedLine = true
end
DT.tooltip:AddDoubleLine(name, SecondsToTime(reset, true, nil, 3), 1, 1, 1, 0.8, 0.8, 0.8)
end
end
local Hr, Min, AmPm = CalculateTimeValues(true)
if DT.tooltip:NumLines() > 0 then
DT.tooltip:AddLine(" ")
end
DT.tooltip:AddLine(" ")
if AmPm == -1 then
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment