Skip to content

Commit d6fcafa

Browse files
committed
fix texts appearing below borders, they will now appear above borders
1 parent 002e43f commit d6fcafa

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

Display.lua

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ function MPT:CreateStates(preview)
6666

6767
-- Timer Bar
6868
self:CreateStatusBar(F, "TimerBar", true, true)
69-
self:CreateText(F.TimerBar, "TimerText", self.TimerText) -- Current Timer
69+
self:CreateText(F.TimerBarBorder, "TimerText", self.TimerText) -- Current Timer
7070
for i=1, 3 do
71-
self:CreateText(F.TimerBar, "ChestTimer"..i, self["ChestTimer"..i], false, false, i) -- Chest Timer
71+
self:CreateText(F.TimerBarBorder, "ChestTimer"..i, self["ChestTimer"..i], false, false, i) -- Chest Timer
7272
end
73-
self:CreateText(F.TimerBar, "ComparisonTimer", self.ComparisonTimer) -- Comparison Timer
73+
self:CreateText(F.TimerBarBorder, "ComparisonTimer", self.ComparisonTimer) -- Comparison Timer
7474
-- Timer Bar Ticks
7575
F.TimerBar.Ticks = {}
7676
for i=1, 2 do
@@ -86,10 +86,10 @@ function MPT:CreateStates(preview)
8686

8787
-- Enemy Forces
8888
self:CreateStatusBar(F, "ForcesBar", true, true)
89-
self:CreateText(F.ForcesBar, "PercentCount", self.PercentCount)
90-
self:CreateText(F.ForcesBar, "Splits", self.ForcesSplits)
91-
self:CreateText(F.ForcesBar, "RealCount", self.RealCount)
92-
self:CreateText(F.ForcesBar, "Completion", self.ForcesCompletion)
89+
self:CreateText(F.ForcesBarBorder, "PercentCount", self.PercentCount)
90+
self:CreateText(F.ForcesBarBorder, "Splits", self.ForcesSplits)
91+
self:CreateText(F.ForcesBarBorder, "RealCount", self.RealCount)
92+
self:CreateText(F.ForcesBarBorder, "Completion", self.ForcesCompletion)
9393

9494
self:CreateStatusBar(F.ForcesBar, "CurrentPullBar", false, false)
9595

@@ -310,7 +310,7 @@ function MPT:DisplayTimerElements(chest, completion, preview, diff)
310310
end
311311
local upgrades = completion and C_ChallengeMode.GetChallengeCompletionInfo().keystoneUpgradeLevels or 0
312312
local timercolor = ((not preview) and completion and (C_ChallengeMode.GetChallengeCompletionInfo().onTime and self.TimerText.SuccessColor or self.TimerText.FailColor)) or self.TimerText.Color
313-
self:ApplyTextSettings(F.TimerBar.TimerText, self.TimerText, string.format("%s/%s", timertext, self:FormatTime(self.timelimit)), timercolor)
313+
self:ApplyTextSettings(F.TimerBarBorder.TimerText, self.TimerText, string.format("%s/%s", timertext, self:FormatTime(self.timelimit)), timercolor)
314314
if diff or preview then
315315
local ComparisonTime = preview and math.random(-200, 200) or diff or 0 -- math.random(-200, 200)
316316
local ComparisonColor = (ComparisonTime < 0 and self.ComparisonTimer.SuccessColor) or (ComparisonTime > 0 and self.ComparisonTimer.FailColor) or self.ComparisonTimer.EqualColor
@@ -321,9 +321,9 @@ function MPT:DisplayTimerElements(chest, completion, preview, diff)
321321
elseif ComparisonTime > 0 then
322322
prefix = "+"
323323
end
324-
self:ApplyTextSettings(F.TimerBar.ComparisonTimer, self.ComparisonTimer, string.format("%s%s", prefix, ComparisonTime == 0 and "+-0" or self:FormatTime(ComparisonTime, true)), ComparisonColor)
324+
self:ApplyTextSettings(F.TimerBarBorder.ComparisonTimer, self.ComparisonTimer, string.format("%s%s", prefix, ComparisonTime == 0 and "+-0" or self:FormatTime(ComparisonTime, true)), ComparisonColor)
325325
else
326-
F.TimerBar.ComparisonTimer:Hide()
326+
F.TimerBarBorder.ComparisonTimer:Hide()
327327
end
328328
for i=3, 1, -1 do
329329
local remTime = self.timelimit-self.timer-((i-1)*self.timelimit*0.2)
@@ -336,9 +336,9 @@ function MPT:DisplayTimerElements(chest, completion, preview, diff)
336336
color = (preview and self["ChestTimer"..i].Color) or (upgrades < i and self["ChestTimer"..i].BehindColor or self["ChestTimer"..i].AheadColor)
337337
prefix = (preview and "") or (upgrades < i and "+" or "-")
338338
end
339-
self:ApplyTextSettings(F.TimerBar["ChestTimer"..i], self["ChestTimer"..i], prefix..self:FormatTime(remTime), color, false, i)
339+
self:ApplyTextSettings(F.TimerBarBorder["ChestTimer"..i], self["ChestTimer"..i], prefix..self:FormatTime(remTime), color, false, i)
340340
else
341-
F.TimerBar["ChestTimer"..i]:Hide()
341+
F.TimerBarBorder["ChestTimer"..i]:Hide()
342342
end
343343
if i > 1 and self.Ticks.enabled and chest >= i then
344344
F.TimerBar.Ticks[i-1]:SetColorTexture(unpack(self.Ticks.Color))
@@ -579,8 +579,8 @@ function MPT:UpdateEnemyForces(Start, preview, completion)
579579
percentText = self.PercentCount.pullcount and currentPullPercent and currentPullPercent > 0 and string.format("%.2f%% (%s%.2f%%)", percentText, percentprefix, currentPullPercent) or string.format("%.2f%%", percentText)
580580
end
581581
end
582-
self:ApplyTextSettings(F.ForcesBar.PercentCount, self.PercentCount, percentText)
583-
self:ApplyTextSettings(F.ForcesBar.RealCount, self.RealCount, remainingText)
582+
self:ApplyTextSettings(F.ForcesBarBorder.PercentCount, self.PercentCount, percentText)
583+
self:ApplyTextSettings(F.ForcesBarBorder.RealCount, self.RealCount, remainingText)
584584
F.ForcesBar:Show()
585585
if self.CurrentPullBar.enabled and currentPull and currentPull > 0 and currentPullPercent and currentPullPercent > 0 and current < total then
586586
local xOffset = (F.ForcesBar:GetValue()/total)*F.ForcesBar:GetWidth()
@@ -601,8 +601,8 @@ function MPT:UpdateEnemyForces(Start, preview, completion)
601601
local color = (diff == 0 and self.ForcesSplits.EqualColor) or (diff < 0 and self.ForcesSplits.SuccessColor) or self.ForcesSplits.FailColor
602602
local prefix = (diff == 0 and "+-0") or (diff < 0 and "-") or "+"
603603
if diff < 0 then diff = diff * -1 end
604-
self:ApplyTextSettings(F.ForcesBar.Splits, self.ForcesSplits, prefix..self:FormatTime(diff), color)
605-
self:ApplyTextSettings(F.ForcesBar.Completion, self.ForcesCompletion, self:FormatTime(math.random(900, 2000)), self.ForcesCompletion.Color)
604+
self:ApplyTextSettings(F.ForcesBarBorder.Splits, self.ForcesSplits, prefix..self:FormatTime(diff), color)
605+
self:ApplyTextSettings(F.ForcesBarBorder.Completion, self.ForcesCompletion, self:FormatTime(math.random(900, 2000)), self.ForcesCompletion.Color)
606606
else
607607
F.ForcesBar.Splits:Hide()
608608
F.ForcesBar.Completion:Hide()
@@ -624,12 +624,12 @@ function MPT:UpdateEnemyForces(Start, preview, completion)
624624
local color = (diff == 0 and self.ForcesSplits.EqualColor) or (diff < 0 and self.ForcesSplits.SuccessColor) or self.ForcesSplits.FailColor
625625
local prefix = (diff == 0 and "+-0") or (diff < 0 and "-") or "+"
626626
if diff < 0 then diff = diff * -1 end
627-
self:ApplyTextSettings(F.ForcesBar.Splits, self.ForcesSplits, prefix..self:FormatTime(diff), color)
627+
self:ApplyTextSettings(F.ForcesBarBorder.Splits, self.ForcesSplits, prefix..self:FormatTime(diff), color)
628628
end
629629
if not self.done then
630630
self.forcesTime = cur or 0
631631
local completionText = cur and self:FormatTime(cur) or ""
632-
self:ApplyTextSettings(F.ForcesBar.Completion, self.ForcesCompletion, completionText, self.ForcesCompletion.Color)
632+
self:ApplyTextSettings(F.ForcesBarBorder.Completion, self.ForcesCompletion, completionText, self.ForcesCompletion.Color)
633633
end
634634
self.done = true
635635
F.ForcesBar:SetStatusBarColor(unpack(self.ForcesBar.CompletionColor))
@@ -645,8 +645,8 @@ function MPT:UpdateEnemyForces(Start, preview, completion)
645645
F.ForcesBar:SetStatusBarColor(unpack(forcesColor))
646646
F.ForcesBar:SetMinMaxValues(0, total)
647647
F.ForcesBar:SetValue(current)
648-
self:ApplyTextSettings(F.ForcesBar.PercentCount, self.PercentCount, string.format("%.2f%%", percent))
649-
self:ApplyTextSettings(F.ForcesBar.RealCount, self.RealCount, remainingText)
648+
self:ApplyTextSettings(F.ForcesBarBorder.PercentCount, self.PercentCount, string.format("%.2f%%", percent))
649+
self:ApplyTextSettings(F.ForcesBarBorder.RealCount, self.RealCount, remainingText)
650650
self:UpdateCurrentPull()
651651
end
652652
end
@@ -708,7 +708,7 @@ function MPT:UpdateCurrentPull()
708708
currentText = rawValue ~= 0 and string.format("%s(%s%s)", currentText, self.RealCount.remaining and "-" or "+", rawValue) or currentText
709709
end
710710

711-
self:ApplyTextSettings(F.ForcesBar.RealCount, self.RealCount, currentText, color)
711+
self:ApplyTextSettings(F.ForcesBarBorder.RealCount, self.RealCount, currentText, color)
712712
end
713713
if self.PercentCount.enabled and self.PercentCount.pullcount and current < total then
714714
local color = current + rawValue >= total and self.PercentCount.CurrentPullColor or self.PercentCount.Color
@@ -722,7 +722,7 @@ function MPT:UpdateCurrentPull()
722722
else
723723
percentText = percentValue ~= 0 and string.format("%s(%s%.2f%%)", percentText, self.PercentCount.remaining and "-" or "+", percentValue) or percentText
724724
end
725-
self:ApplyTextSettings(F.ForcesBar.PercentCount, self.PercentCount, percentText, color)
725+
self:ApplyTextSettings(F.ForcesBarBorder.PercentCount, self.PercentCount, percentText, color)
726726
end
727727
if self.CurrentPullBar.enabled and rawValue and rawValue > 0 and current < total then
728728
local xOffset = (F.ForcesBar:GetValue()/total)*F.ForcesBar:GetWidth()

0 commit comments

Comments
 (0)