Commit fdb086bb authored by Merathilis's avatar Merathilis

Added a header to our Datatexts. This will prevent to use the Header Font Size...

Added a header to our Datatexts. This will prevent to use the Header Font Size on the tooltip for different values. Which looked weird.
parent b182c487
......@@ -25,6 +25,10 @@ end
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..ARMOR)
DT.tooltip:AddLine(" ")
DT.tooltip:AddLine(L["Mitigation By Level: "])
DT.tooltip:AddLine(' ')
......
......@@ -43,6 +43,10 @@ end
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..STAT_ATTACK_POWER)
DT.tooltip:AddLine(" ")
if E.myclass == "HUNTER" then
local OverrideAPBySpellPower = GetOverrideAPBySpellPower()
if (OverrideAPBySpellPower ~= nil) then
......
......@@ -93,6 +93,10 @@ end
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..L["Avoidance Breakdown"])
DT.tooltip:AddLine(" ")
if targetlv > 1 then
DT.tooltip:AddDoubleLine(L["Avoidance Breakdown"], strjoin("", " (", L["lvl"], " ", targetlv, ")"))
elseif targetlv == -1 then
......
......@@ -31,6 +31,10 @@ end
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..L["Bags"])
DT.tooltip:AddLine(" ")
for i = 1, MAX_WATCHED_TOKENS do
local name, count = GetBackpackCurrencyInfo(i)
if name and i == 1 then
......
......@@ -92,6 +92,11 @@ local function OnEnter(self)
end
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..BATTLEGROUND_HOLIDAY)
DT.tooltip:AddLine(" ")
local numCTA = 0
local addTooltipHeader = true
for i=1, GetNumRandomDungeons() do
......
......@@ -37,6 +37,10 @@ end
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..L["Config"])
DT.tooltip:AddLine(" ")
DT.tooltip:AddDoubleLine(L["Left Click:"], L["Toggle Configuration"], 1, 1, 1)
DT.tooltip:AddDoubleLine(L["Hold Shift + Right Click:"], reloadText, 1, 1, 1)
if plugins then
......
......@@ -30,6 +30,10 @@ local lastPanel;
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..STAT_CRITICAL_STRIKE)
DT.tooltip:AddLine(" ")
local text, tooltip;
if E.role == "Caster" then
text = HIGHLIGHT_FONT_COLOR_CODE..format(PAPERDOLLFRAME_TOOLTIP_FORMAT, SPELL_CRIT_CHANCE).." "..format("%.2F%%", GetSpellCritChance(1))..FONT_COLOR_CODE_CLOSE
......
......@@ -61,6 +61,10 @@ end
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..CURRENCY)
DT.tooltip:AddLine(" ")
DT.tooltip:AddDoubleLine(L["Gold"]..":", goldText, nil, nil, nil, 1, 1, 1)
DT.tooltip:AddLine(' ')
......
......@@ -45,6 +45,7 @@ local function OnEnter(self)
if not index then return; end
DT:SetupTooltip(self)
DT.tooltip:SetCurrencyToken(index)
DT.tooltip:Show()
end
......
......@@ -55,6 +55,10 @@ end
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..DURABILITY)
DT.tooltip:AddLine(" ")
for slot, durability in pairs(invDurability) do
DT.tooltip:AddDoubleLine(slot, format(tooltipString, durability), 1, 1, 1, E:ColorGradient(durability * 0.01, 1, 0, 0, 1, 1, 0, 0, 1, 0))
end
......
......@@ -426,6 +426,10 @@ local function OnEnter(self)
DT:SetupTooltip(self)
lastTooltipXLineHeader = nil
-- Header
DT.tooltip:AddLine(E.title..FRIENDS)
DT.tooltip:AddLine(" ")
local onlineFriends = C_FriendList_GetNumOnlineFriends()
local numberOfFriends = C_FriendList_GetNumFriends()
local totalBNet, numBNetOnline = BNGetNumFriends()
......
......@@ -32,6 +32,10 @@ end
local function OnEnter(self, _, noUpdate)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..L["Garrison"])
DT.tooltip:AddLine(" ")
if(not noUpdate) then
DT.tooltip:Hide()
C_GarrisonRequestLandingPageShipmentInfo();
......
......@@ -77,6 +77,11 @@ end
local myGold = {}
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..L["Gold"])
DT.tooltip:AddLine(" ")
local textOnly = not E.db.datatexts.goldCoins and true or false
local style = E.db.datatexts.goldFormat or "BLIZZARD"
......
......@@ -220,6 +220,10 @@ local function OnEnter(self, _, noUpdate)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..GUILD)
DT.tooltip:AddLine(" ")
local total, _, online = GetNumGuildMembers()
if #guildTable == 0 then BuildGuildTable() end
......
......@@ -33,6 +33,10 @@ end
local OnEnter = function(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..STAT_HASTE)
DT.tooltip:AddLine(" ")
local rating = CR_HASTE_MELEE;
local classTooltip = _G["STAT_HASTE_"..E.myclass.."_TOOLTIP"]
local haste = GetHaste()
......
......@@ -21,6 +21,10 @@ local lastPanel;
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..STAT_LIFESTEAL)
DT.tooltip:AddLine(" ")
local text, tooltip;
text = HIGHLIGHT_FONT_COLOR_CODE..format(PAPERDOLLFRAME_TOOLTIP_FORMAT, STAT_LIFESTEAL).." "..format("%.2F%%", GetLifesteal())..FONT_COLOR_CODE_CLOSE
tooltip = format(CR_LIFESTEAL_TOOLTIP, BreakUpLargeNumbers(GetCombatRating(CR_LIFESTEAL)), GetCombatRatingBonus(CR_LIFESTEAL))
......
......@@ -21,6 +21,10 @@ local function OnEnter(self)
DT:SetupTooltip(self)
DT.tooltip:ClearLines()
-- Header
DT.tooltip:AddLine(E.title..STAT_MASTERY)
DT.tooltip:AddLine(" ")
local primaryTalentTree = GetSpecialization();
if (primaryTalentTree) then
......
......@@ -48,6 +48,10 @@ end
local function OnEnter(self, _, noUpdate)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..L["BfA Missions"])
DT.tooltip:AddLine(" ")
if(not noUpdate) then
DT.tooltip:Hide()
C_Garrison_RequestLandingPageShipmentInfo()
......
......@@ -38,6 +38,10 @@ end
local function OnEnter(self, _, noUpdate)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..L["Orderhall"])
DT.tooltip:AddLine(" ")
if(not noUpdate) then
DT.tooltip:Hide()
C_Garrison_RequestLandingPageShipmentInfo();
......
......@@ -21,6 +21,10 @@ local quickJoinGroups, quickJoin = nil, {}
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..QUICK_JOIN)
DT.tooltip:AddLine(" ")
if not next(quickJoin) then return end
DT.tooltip:AddLine(QUICK_JOIN, nil, nil, nil, true);
......
......@@ -74,6 +74,10 @@ end
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..L["Talent/Loot Specialization"])
DT.tooltip:AddLine(" ")
for i = 1, GetNumSpecializations() do
local _, name = GetSpecializationInfo(i);
if name then
......
......@@ -21,6 +21,10 @@ local lastPanel;
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..STAT_SPEED)
DT.tooltip:AddLine(" ")
local text, tooltip;
text = HIGHLIGHT_FONT_COLOR_CODE..format(PAPERDOLLFRAME_TOOLTIP_FORMAT, STAT_SPEED).." "..format("%.2F%%", GetSpeed())..FONT_COLOR_CODE_CLOSE
tooltip = format(CR_SPEED_TOOLTIP, BreakUpLargeNumbers(GetCombatRating(CR_SPEED)), GetCombatRatingBonus(CR_SPEED))
......
......@@ -120,6 +120,10 @@ local function OnEnter(self)
local bandwidth = GetAvailableBandwidth()
local _, _, homePing, worldPing = GetNetStats()
-- Header
DT.tooltip:AddLine(E.title..L["System"])
DT.tooltip:AddLine(" ")
DT.tooltip:AddDoubleLine(L["Home Latency:"], format(homeLatencyString, homePing), 0.69, 0.31, 0.31,0.84, 0.75, 0.65)
DT.tooltip:AddDoubleLine(L["World Latency:"], format(homeLatencyString, worldPing), 0.69, 0.31, 0.31,0.84, 0.75, 0.65)
......
......@@ -22,6 +22,10 @@ local lastPanel;
local function OnEnter(self)
DT:SetupTooltip(self)
-- Header
DT.tooltip:AddLine(E.title..STAT_VERSATILITY)
DT.tooltip:AddLine(" ")
local versatility = GetCombatRating(CR_VERSATILITY_DAMAGE_DONE);
local versatilityDamageBonus = GetCombatRatingBonus(CR_VERSATILITY_DAMAGE_DONE) + GetVersatilityBonus(CR_VERSATILITY_DAMAGE_DONE);
local versatilityDamageTakenReduction = GetCombatRatingBonus(CR_VERSATILITY_DAMAGE_TAKEN) + GetVersatilityBonus(CR_VERSATILITY_DAMAGE_TAKEN);
......
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