Equipment Manager "New Set" Button - WoWInterface
Thread Tools Display Modes
10-22-14, 02:41 PM   #1
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 30
Equipment Manager "New Set" Button


im trying to seperate the "New Set" button in the equipment manager because I dont want an border around this one. The problem is that the name of that button isnt always the same...

My code works if I have only a small number of sets saved and if I dont delete or add a new one.
Maybe the hooked function isnt the right one?

Lua Code:
  1. hooksecurefunc("PaperDollEquipmentManagerPane_Update", function()
  2.             for i = 1, 9 do
  3.                 local button = _G["PaperDollEquipmentManagerPaneButton"..i]
  4.                 local icon = _G["PaperDollEquipmentManagerPaneButton"..i.."Icon"]
  5.                 local text = button.text:GetText()
  6.                 print(text)
  8.                 if button and not button.skinned then
  9.                     if (text == "New Set") then
  10.                         button.skinned = true
  11.                     else
  12.                         local border = CreateFrame("Frame", nil, button)
  13.                         border:SetAllPoints(icon)
  14.                         border:CreateBeautyBorder(12)  
  15.                         border:SetBeautyBorderPadding(1)
  16.                         icon:SetTexCoord(0.07, 0.93, 0.07, 0.93)
  17.                         button.skinned = true
  18.                     end
  19.                 end
  20.             end
  21.         end)

Last edited by evilbib : 10-22-14 at 02:43 PM.
  Reply With Quote
10-22-14, 09:17 PM   #2
Premium Member
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851

And what exactly does happen (or doesn't happen *g*) if your code fails?
  Reply With Quote
10-23-14, 05:55 AM   #3
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 30
For example if I add a new set the new set button gets an border and the new set doesn't. I think because the new set button becomes PaperDollEquipmentManagerPaneButtoni+1 and the new set becomes the old new set button.

And another example if I have like 15 sets saved then the new set button only appears if I scroll down. So the getText() function doesnt run on this button I guess.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Equipment Manager "New Set" Button

Thread Tools
Display Modes

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