Skip to content

Commit

Permalink
Change the highlight to darken the backdrop so it works nicely with q…
Browse files Browse the repository at this point in the history
…uest items.
  • Loading branch information
haste committed Jan 14, 2012
1 parent f19a9a1 commit c52bbd8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions butsu.lua
Expand Up @@ -72,7 +72,9 @@ function Butsu:LOOT_OPENED(event, autoloot)
slot.drop:Hide()
end

slot.isQuestItem = isQuestItem
slot.quality = quality

slot.name:SetText(item)
slot.name:SetTextColor(r, g, b)
slot.icon:SetTexture(texture)
Expand Down
9 changes: 8 additions & 1 deletion slots.lua
Expand Up @@ -11,15 +11,22 @@ local OnEnter = function(self)
GameTooltip:SetLootItem(slot)
CursorUpdate(self)
end
if(self.drop:IsShown()) then
local r, g, b = self.drop:GetVertexColor()
self.drop:SetVertexColor(r * .6, g * .6, b * .6)
else
self.drop:SetVertexColor(1, 1, 0)
end

self.drop:Show()
self.drop:SetVertexColor(1, 1, 0)
end

local OnLeave = function(self)
if(self.quality > 1) then
local color = ITEM_QUALITY_COLORS[self.quality]
self.drop:SetVertexColor(color.r, color.g, color.b)
elseif(self.isQuestItem) then
self.drop:SetVertexColor(1, 1, .2)
else
self.drop:Hide()
end
Expand Down

0 comments on commit c52bbd8

Please sign in to comment.