View Single Post
04-27-12, 06:18 AM   #2
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by Qupe View Post
Off the bat here are download links:
http://www.wowinterface.com/download...-cargBags.html
http://www.wowinterface.com/download...implicity.html
(my edit)
http://www.wowinterface.com/download...28-QuseUI.html

What I'm trying to do is remove the ability of CargBags to highlight based on item quality.

What I've tried so far (because I'm assuming this is where it's happening) is go into CargBags>mixins-add>default.scaffold and edit the texture, blend and opacity. I've tried removing those lines from the addon etc... from anything I do straight up disables highlighting (via any other addon) completely.

What I'd like to do is completely remove anything related to highlighting from CargBags completely which would let anything else - like oGlow - handle the highlighting.

To clarify any questions:
I'm doing this so I can use an addon like oGlow and style it's highlight (so it applies to the character frame and bag - and matches). I haven't been able to figure out how to style CargBag's highlight. I;ve tried other addons that are mods of CargBags (ie -lumBags, m_bags, etc...) and still cannot get them to work.

Basically, TL;DR, I want to remove the ability of CargBags to highlight item quality and let another addon take over that ability. Please let me know if I've excluded any information.
Try this script i am using.

you will have to add your own border n stuff.

LUA Code:
  1. local _G = _G -- import globals for faster usage
  2.  
  3. local function UpdateGlow(button, id)
  4.     local quality, texture, _
  5.     if(id) then
  6.         quality, _, _, _, _, _, _, texture = select(3, GetItemInfo(id))
  7.     end
  8.    
  9.     local glow = button.glow
  10.     if(not glow) then
  11.         glow = CreateFrame("Frame", nil, button)
  12.         CreateBorderLight(glow, AftermathhUI.media.bordersize-1, AftermathhUI.bordercolor, AftermathhUI.bordercolor, AftermathhUI.bordercolor, 1)
  13.         SetTexture(glow, AftermathhUI.media.bordernormal)
  14.         glow:SetPoint("TOPLEFT", button, "TOPLEFT")
  15.         glow:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT")
  16.         button.glow = glow
  17.     end
  18.    
  19.     if(texture) then
  20.         local r, g, b = GetItemQualityColor(quality)
  21.         if _G[button:GetName().."IconQuestTexture"] and _G[button:GetName().."IconQuestTexture"]:IsShown() then
  22.             r, g, b = unpack(AftermathhUI.loot.questitemcolor)
  23.         end
  24.         ColorBorder(glow, r, g, b)
  25.         glow:Show()
  26.     else
  27.         glow:Hide()
  28.     end
  29. end
  30.  
  31. hooksecurefunc("BankFrameItemButton_Update", function(self)
  32.     UpdateGlow(self, GetInventoryItemID("player", self:GetInventorySlot()))
  33. end)
  34.  
  35. hooksecurefunc("ContainerFrame_Update", function(self)
  36.     for i = 1, self.size do
  37.         UpdateGlow(_G[self:GetName().."Item"..i], GetContainerItemID(self:GetID(), _G[self:GetName().."Item"..i]:GetID()))
  38.     end
  39. end)
  Reply With Quote