Thread Tools Display Modes
04-27-12, 02:34 AM   #1
Qupe
A Warpwood Thunder Caller
 
Qupe's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 92
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.
__________________
Quse UI
WoW :: EQ2
  Reply With Quote
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
04-27-12, 08:28 AM   #3
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
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

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.
  Reply With Quote
04-27-12, 10:44 PM   #4
Qupe
A Warpwood Thunder Caller
 
Qupe's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 92
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.
__________________
Quse UI
WoW :: EQ2
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » CargBags Item Highlight


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off