Skip to content

Commit d85568e

Browse files
committed
update colors and text alignment of stats summary
1 parent ec1883f commit d85568e

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

src/Classes/CompareTab.lua

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ local LAYOUT = {
4949

5050
-- Summary view columns
5151
summaryCol1 = 10,
52-
summaryCol2 = 300,
53-
summaryCol3 = 450,
52+
summaryCol2Right = 440,
53+
summaryCol3Right = 580,
5454
summaryCol4 = 600,
5555

5656
-- Items view
@@ -2812,8 +2812,8 @@ function CompareTabClass:DrawSummary(vp, compareEntry)
28122812

28132813
-- Column positions
28142814
local col1 = LAYOUT.summaryCol1
2815-
local col2 = LAYOUT.summaryCol2
2816-
local col3 = LAYOUT.summaryCol3
2815+
local col2R = LAYOUT.summaryCol2Right
2816+
local col3R = LAYOUT.summaryCol3Right
28172817
local col4 = LAYOUT.summaryCol4
28182818

28192819
SetViewport(vp.x, vp.y, vp.width, vp.height)
@@ -2822,8 +2822,9 @@ function CompareTabClass:DrawSummary(vp, compareEntry)
28222822
-- Headers
28232823
SetDrawColor(1, 1, 1)
28242824
DrawString(col1, drawY, "LEFT", headerHeight, "VAR", "^7Stat")
2825-
DrawString(col2, drawY, "LEFT", headerHeight, "VAR", colorCodes.POSITIVE .. self:GetShortBuildName(self.primaryBuild.buildName))
2826-
DrawString(col3, drawY, "LEFT", headerHeight, "VAR", colorCodes.WARNING .. (compareEntry.label or "Compare Build"))
2825+
DrawString(col2R, drawY, "RIGHT_X", headerHeight, "VAR", colorCodes.POSITIVE .. self:GetShortBuildName(self.primaryBuild.buildName))
2826+
DrawString(col3R, drawY, "RIGHT_X", headerHeight, "VAR",
2827+
colorCodes.WARNING .. (compareEntry.label or "Compare Build"))
28272828
DrawString(col4, drawY, "LEFT", headerHeight, "VAR", "^7Difference")
28282829
drawY = drawY + headerHeight + 4
28292830

@@ -2837,7 +2838,7 @@ function CompareTabClass:DrawSummary(vp, compareEntry)
28372838
local primaryEnv = self.primaryBuild.calcsTab.mainEnv
28382839
local compareEnv = compareEntry.calcsTab.mainEnv
28392840

2840-
drawY = self:DrawStatList(drawY, vp, displayStats, primaryOutput, compareOutput, primaryEnv, compareEnv, col1, col2, col3, col4)
2841+
drawY = self:DrawStatList(drawY, displayStats, primaryOutput, compareOutput, primaryEnv, compareEnv, col1, col4, col2R, col3R)
28412842

28422843
-- ========================================
28432844
-- Compare Power Report section
@@ -2923,7 +2924,7 @@ function CompareTabClass:DrawSummary(vp, compareEntry)
29232924
end
29242925

29252926

2926-
function CompareTabClass:DrawStatList(drawY, vp, displayStats, primaryOutput, compareOutput, primaryEnv, compareEnv, col1, col2, col3, col4)
2927+
function CompareTabClass:DrawStatList(drawY, displayStats, primaryOutput, compareOutput, primaryEnv, compareEnv, col1, col4, col2R, col3R)
29272928
local lineHeight = 16
29282929

29292930
-- Get skill flags from both builds for stat filtering
@@ -2989,8 +2990,8 @@ function CompareTabClass:DrawStatList(drawY, vp, displayStats, primaryOutput, co
29892990
-- Draw stat row
29902991
local labelColor = statData.color or "^7"
29912992
DrawString(col1, drawY, "LEFT", lineHeight, "VAR", labelColor .. (statData.label or statData.stat))
2992-
DrawString(col2, drawY, "LEFT", lineHeight, "VAR", "^7" .. primaryStr)
2993-
DrawString(col3, drawY, "LEFT", lineHeight, "VAR", diffColor .. compareStr)
2993+
DrawString(col2R, drawY, "RIGHT_X", lineHeight, "VAR", "^7" .. primaryStr)
2994+
DrawString(col3R, drawY, "RIGHT_X", lineHeight, "VAR", colorCodes.SPLITPERSONALITY .. compareStr)
29942995
if diffStr ~= "" then
29952996
DrawString(col4, drawY, "LEFT", lineHeight, "VAR", diffColor .. diffStr)
29962997
end
@@ -3004,8 +3005,8 @@ function CompareTabClass:DrawStatList(drawY, vp, displayStats, primaryOutput, co
30043005
local primaryShown = statData.condFunc(primaryOutput)
30053006
local compareShown = statData.condFunc(compareOutput)
30063007
DrawString(col1, drawY, "LEFT", lineHeight, "VAR", labelColor .. statData.label)
3007-
DrawString(col2, drawY, "LEFT", lineHeight, "VAR", "^7" .. (primaryShown and valStr or "-"))
3008-
DrawString(col3, drawY, "LEFT", lineHeight, "VAR", "^7" .. (compareShown and valStr or "-"))
3008+
DrawString(col2R, drawY, "RIGHT_X", lineHeight, "VAR", "^7" .. (primaryShown and valStr or "-"))
3009+
DrawString(col3R, drawY, "RIGHT_X", lineHeight, "VAR", colorCodes.WARNING .. (compareShown and valStr or "-"))
30093010
drawY = drawY + lineHeight + 1
30103011
end
30113012
end

0 commit comments

Comments
 (0)