Colored items in buy tab results

This commit is contained in:
Zerf
2015-09-09 21:26:27 +03:00
parent 0730cb3a22
commit e2825b9ad1
2 changed files with 15 additions and 3 deletions
+6 -2
View File
@@ -121,6 +121,7 @@ function processScanResults(rawData)
stackSize = rawDatum.stackSize,
buyoutPrice = rawDatum.buyoutPrice,
itemPrice = rawDatum.buyoutPrice / rawDatum.stackSize,
quality = rawDatum.quality,
})
end
end
@@ -177,8 +178,11 @@ function Auctionator_Buy_ScrollbarUpdate()
local lineEntry_name = getglobal("AuctionatorBuyEntry"..line.."_Name")
local lineEntry_stackSize = getglobal("AuctionatorBuyEntry"..line.."_StackSize")
lineEntry_name:SetText(entry.name)
local color = "ffffffff"
if(type(Auctionator.item_colors[entry.quality+1]) == "string") then color = Auctionator.item_colors[entry.quality+1]; end
lineEntry_name:SetText("\124c" .. color .. entry.name .. "\124r")
if Auctionator_SetContains(selectedEntries, entry) then
lineEntry:LockHighlight()
+9 -1
View File
@@ -17,7 +17,15 @@ Auctionator = {
buy = {
index = 5
}
}
},
item_colors = {
"ff9d9d9d", -- poor, gray
"ffffffff", -- common, white
"ff1eff00", -- uncommon, green
"ff0070dd", -- rare, blue
"ffa335ee", -- epic, purple
"ffff8000", -- legendary, orange
}
}
-----------------------------------------