From e2825b9ad112f0428d636c8ee2c5c99a8761393e Mon Sep 17 00:00:00 2001 From: Zerf Date: Wed, 9 Sep 2015 21:26:27 +0300 Subject: [PATCH] Colored items in buy tab results --- Buy.lua | 8 ++++++-- Sell.lua | 10 +++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Buy.lua b/Buy.lua index 33a67ec..e4f19ab 100644 --- a/Buy.lua +++ b/Buy.lua @@ -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() diff --git a/Sell.lua b/Sell.lua index 2cb1244..348dda1 100644 --- a/Sell.lua +++ b/Sell.lua @@ -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 + } } -----------------------------------------