Mercurial > wow > reagentmaker
diff SecureMenu.lua @ 19:f7b23db7bcc6
Correct tooltips for external tradeskills like milling
author | contrebasse |
---|---|
date | Fri, 08 Apr 2011 19:58:08 +0200 |
parents | 2716889648bd |
children | 4ea38bae4174 |
line wrap: on
line diff
--- a/SecureMenu.lua Fri Apr 08 19:24:22 2011 +0200 +++ b/SecureMenu.lua Fri Apr 08 19:58:08 2011 +0200 @@ -10,12 +10,15 @@ tinsert(UISpecialFrames,"ReagentMaker_ExternalFrame") -- make it closable with escape MenuFrame:SetScript("OnEvent",function(self,event,...) - if event == "TRADE_SKILL_CLOSE" or event == "PLAYER_REGEN_DISABLED" then + if event == "TRADE_SKILL_UPDATE" then + MenuFrame.updateCounts() + elseif event == "TRADE_SKILL_CLOSE" or event == "PLAYER_REGEN_DISABLED" then MenuFrame:Hide() end end) MenuFrame:RegisterEvent("TRADE_SKILL_CLOSE") MenuFrame:RegisterEvent("PLAYER_REGEN_ENABLED") +MenuFrame:RegisterEvent("TRADE_SKILL_UPDATE") A.MenuFrame = MenuFrame -- Background adaptable vertically @@ -153,7 +156,7 @@ action(itemID,reagentIndex,IsShiftKeyDown()) end -local function updateCounts() +function MenuFrame.updateCounts() local anyMakable for i=1,numActiveEntries do btn = menuEntries[i] @@ -285,7 +288,7 @@ MenuFrame:ClearAllPoints() MenuFrame:SetPoint("TOPLEFT",TradeSkillFrame,"TOPRIGHT",-2,14) - updateCounts() + MenuFrame.updateCounts() MenuFrame:Show() end