WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   CargBags Item Highlight (https://www.wowinterface.com/forums/showthread.php?t=43353)

Qupe 04-27-12 02:34 AM

CargBags Item Highlight
 
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.

Aftermathhqt 04-27-12 06:18 AM

Quote:

Originally Posted by Qupe (Post 255926)
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)

Haleth 04-27-12 08:28 AM

Game92, I believe he already knows what addon he's going to use, he's asking how to disable the cargBags glow. Also, when you post code you should at least edit it a little so anyone can use it and not get errors because it contains stuff specific to your UI :p

OP, have you tried to disable the ItemButton_UpdateQuest function in default.scaffold.lua? Specifically this part handles the quality colour:

Code:

        elseif(item.rarity and item.rarity > 1 and self.glowTex) then
                a, r,g,b = self.glowAlpha, GetItemQualityColor(item.rarity)
                texture = self.glowTex
                blend = self.glowBlend
                tL,tR,tT,tB = unpack(self.glowCoords)

Make sure you have lua errors turned on if you delete the function entirely so you can see where else it is used.

Qupe 04-27-12 10:44 PM

That was one of the first things I tried. After commenting out those lines (and one other line: self:UpdateQuest(item) earlier in the code) all that happened was the item glow was gone completely.

Which would be fine but oGlow highlighting wasn't able to highlight anything in the bags after that either.


All times are GMT -6. The time now is 09:09 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI