Skip to content

Commit

Permalink
Added red color for non-purchased bank slots.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wetxius committed Jan 19, 2019
1 parent ccffe76 commit a945a85
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion ShestakUI/Modules/Blizzard/Bags.lua
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,12 @@ function Stuffing:BagFrameSlotNew(p, slot)
if not ret.frame.tooltipText then
ret.frame.tooltipText = ""
end

if slot > GetNumBankSlots() then
SetItemButtonTextureVertexColor(ret.frame, 1.0, 0.1, 0.1)
else
SetItemButtonTextureVertexColor(ret.frame, 1.0, 1.0, 1.0)
end
else
ret.frame = CreateFrame("CheckButton", "StuffingFBag"..slot.."Slot", p, "BagSlotButtonTemplate")

Expand Down Expand Up @@ -1472,12 +1478,24 @@ end

function Stuffing:PLAYERBANKBAGSLOTS_CHANGED()
if not StuffingPurchaseButtonBank then return end
local _, full = GetNumBankSlots()
local numSlots, full = GetNumBankSlots()
if full then
StuffingPurchaseButtonBank:Hide()
else
StuffingPurchaseButtonBank:Show()
end

local button
for i = 1, NUM_BANKBAGSLOTS, 1 do
button = _G["StuffingBBag"..i.."Slot"]
if button then
if i <= numSlots then
SetItemButtonTextureVertexColor(button, 1.0, 1.0, 1.0)
else
SetItemButtonTextureVertexColor(button, 1.0, 0.1, 0.1)
end
end
end
end

function Stuffing.Menu(self, level)
Expand Down

0 comments on commit a945a85

Please sign in to comment.