5.4 PTR Display Issue
Siory opened this issue ยท 6 comments
On the current 5.4 PTR (and all prior builds that I can remember) the Bagnon display shows a bright blue background for each inventory slot regardless of configuration. Mousing over a non-empty inventory slot will clear that blue background until a UI reload. For empty inventory slots, it is not possible to remove the blue glow. This occurs even if Bagnon and BagnonConfig are the only loaded addons.
This is related to the new online store functionality Blizzard is adding in 5.4. There is a new texture added to all slots called NewItemTexture. I added the following code to the ITEM.LUA file and it appears to be fixed for the PTR.
Line 66: item.newItemBorder = _G[name .. 'NewItemTexture']
Line 364: self.newItemBorder:Hide()
This is just a starting point. I am sure there is more coding needed to get this new feature to function as Blizzard intended.
No problem. I looked into Blizzard's code and found that they have some functions that determine if an item should be highlighted as "New". If you make the following changes to the ITEM.LUA file it should work more closely to how the original bags do.
Line 66: item.newItemBorder = _G[name .. 'NewItemTexture']
Line 365: if (self:IsNewItem()) then
Line 366: self.newItemBorder:Show()
Line 367: else
Line 368: self.newItemBorder:Hide()
Line 369: end
Create a new function:
function ItemSlot:IsNewItem()
return C_NewItems.IsNewItem(self:GetBag(), self:GetID()) and IsBattlePayItem(self:GetBag(), self:GetID())
end
Right now my problem is that the new item highlight hides the quality borders. Still trying to come up with a solution that will better work with the quality display.
Since it looks like this border will only show for newly purchased items from the online store I wonder how often this border will show. On top of that it seems that it is not permanent and will only show until the item is inspected or used, but I could be wrong. If either of these is the case then maybe it is OK to show this border over the quality border.