Skip to content

Commit

Permalink
Color Item ID and Level using summary colors (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
raethkcj committed Sep 23, 2022
1 parent d2c42b6 commit 2ade24c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions RatingBuster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1621,14 +1621,18 @@ function RatingBuster.ProcessTooltip(tooltip, name, link)
if link then
local _, _, id = strfind(link, "item:(%d+)")
local newLine = ""
local statColor = globalDB.sumStatColor
local valueColor = globalDB.sumValueColor
if level and globalDB.showItemLevel then
newLine = newLine..L["ItemLevel: "]..level
newLine = newLine .. statColor:WrapTextInColorCode(L["ItemLevel: "])
newLine = newLine .. valueColor:WrapTextInColorCode(level)
end
if id and globalDB.showItemID then
if newLine ~= "" then
newLine = newLine..", "
end
newLine = newLine..L["ItemID: "]..id
newLine = newLine .. statColor:WrapTextInColorCode(L["ItemID: "])
newLine = newLine .. valueColor:WrapTextInColorCode(id)
end
if newLine ~= "" then
cache[link] = newLine
Expand Down

0 comments on commit 2ade24c

Please sign in to comment.