From e7e3da6d2767ff6ad7ffcf939d5a9ed6b951c212 Mon Sep 17 00:00:00 2001 From: p3lim-52096 Date: Sun, 1 Mar 2009 19:06:30 +0000 Subject: [PATCH] Removed border on icon git-svn-id: svn://svn.wowinterface.com/Broker_Equipment-429/trunk@3 ec0254a7-aafd-4d69-bcb1-797bd6548cda --- Broker_Equipment/Broker_Equipment.lua | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Broker_Equipment/Broker_Equipment.lua b/Broker_Equipment/Broker_Equipment.lua index e8a2860..af108cb 100644 --- a/Broker_Equipment/Broker_Equipment.lua +++ b/Broker_Equipment/Broker_Equipment.lua @@ -1,19 +1,22 @@ local dummy = CreateFrame('Frame', 'Broker_EquipmentDummy', UIParent, 'UIDropDownMenuTemplate') -local addon = LibStub:GetLibrary('LibDataBroker-1.1'):NewDataObject('Broker_Equipment', { +local broker = LibStub:GetLibrary('LibDataBroker-1.1'):NewDataObject('Broker_Equipment', { type = 'data source', text = 'Equipment', icon = 'Interface\\PaperDollInfoFrame\\UI-EquipmentManager-Toggle', + iconCoords = {0.065, 0.935, 0.065, 0.935} }) -function addon.OnClick(self, button) +function broker.OnClick(self, button) local menu = {} for i = 1, GetNumEquipmentSets() do - local name = GetEquipmentSetInfo(i) + local name, texture = GetEquipmentSetInfo(i) table.insert(menu, { tooltipTitle = name, text = name, func = function() EquipmentManager_EquipSet(name) + broker.text = name + broker.icon = texture end }) end @@ -24,11 +27,16 @@ function addon.OnClick(self, button) if(GameTooltip:GetOwner() == self) then GameTooltip:Hide() end end -function addon.OnTooltipShow(self) - self:AddLine('Broker Equipment') +function broker.OnTooltipShow(self) + self:AddLine('|cff0090ffBroker Equipment|r') self:AddLine('Click here to change your set') end --- force the equipmanager to enable -SetCVar('equipmentManager', 1) -GearManagerToggleButton:Show() \ No newline at end of file +dummy:RegisterEvent('PLAYER_LOGIN') +dummy:SetScript('OnEvent', function() + -- force the equipmanager to enable + SetCVar('equipmentManager', 1) + GearManagerToggleButton:Show() + + -- Todo: Set the name of the set that you are wearing on load +end) \ No newline at end of file -- 1.7.9.5