Skip to content

Commit

Permalink
Adjust empty item buttons to be less eye catching
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevcairiel committed Aug 30, 2019
1 parent 5e97c0b commit 9e0f939
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ function Inventorian.Item:WrapItemButton(item)
item.searchOverlay:SetSize(39, 39)
item.searchOverlay:SetPoint("CENTER")

-- adjust ther normal texture to be less "obvious" on empty buttons
item:GetNormalTexture():SetVertexColor(1,1,1,0.66)

return item
end

Expand Down Expand Up @@ -135,7 +138,13 @@ function Item:GetItem()
end

function Item:SetTexture(icon)
SetItemButtonTexture(self, icon or [[Interface\PaperDoll\UI-Backpack-EmptySlot]])
if icon then
SetItemButtonTexture(self, icon)
self.icon:SetAlpha(1)
else
SetItemButtonTexture(self, [[Interface\PaperDoll\UI-Backpack-EmptySlot]])
self.icon:SetAlpha(0.66)
end
end

function Item:SetCount(count)
Expand Down

0 comments on commit 9e0f939

Please sign in to comment.