utlize inline icons and CreateGoldString in repair module

This commit is contained in:
Brues
2026-08-21 15:00:25 -05:00
parent c64a501e6f
commit 7ccc56c241
+7 -3
View File
@@ -418,8 +418,13 @@ pfUI:RegisterModule("panel", function()
local repPercent = floor(cur / max * 100) local repPercent = floor(cur / max * 100)
if repPercent < 100 then if repPercent < 100 then
local _, _, _, hex = GetColorGradient(repPercent/100) local _, _, _, hex = GetColorGradient(repPercent/100)
local link = GetInventoryItemLink("player", id)
local texture = GetInventoryItemTexture("player", id)
if texture then
link = CreateSimpleTextureMarkup(texture, 24) .. " " .. link
end
itemLines[table.getn(itemLines)+1] = { itemLines[table.getn(itemLines)+1] = {
GetInventoryItemLink("player", id), link,
string.format("%s%s%%|r", hex, repPercent) string.format("%s%s%%|r", hex, repPercent)
} }
end end
@@ -428,8 +433,7 @@ pfUI:RegisterModule("panel", function()
if totalRep > 0 then if totalRep > 0 then
GameTooltip:ClearLines() GameTooltip:ClearLines()
GameTooltip_SetDefaultAnchor(GameTooltip, this) GameTooltip_SetDefaultAnchor(GameTooltip, this)
GameTooltip:SetText("|cff555555"..(string.gsub(REPAIR_COST,":","")).."|r") GameTooltip:AddLine(REPAIR_COST.." " .. CreateGoldString(totalRep), 0.3333, 0.3333, 0.3333)
SetTooltipMoney(GameTooltip, totalRep)
for _,line in ipairs(itemLines) do for _,line in ipairs(itemLines) do
GameTooltip:AddDoubleLine(line[1],line[2]) GameTooltip:AddDoubleLine(line[1],line[2])
end end