Mercurial > wow > reagentmaker
comparison SecureMenu.lua @ 32:416c307fd00b
Add recipe tooltip for the crafted reagent in the external window
author | contrebasse |
---|---|
date | Thu, 28 Apr 2011 23:39:30 +0200 |
parents | 22fa64c9b2de |
children | 218e1dd1b821 |
comparison
equal
deleted
inserted
replaced
31:22fa64c9b2de | 32:416c307fd00b |
---|---|
36 GameTooltip:SetOwner(self) | 36 GameTooltip:SetOwner(self) |
37 GameTooltip:SetHyperlink(self.reagentLink) | 37 GameTooltip:SetHyperlink(self.reagentLink) |
38 GameTooltip:Show() | 38 GameTooltip:Show() |
39 GameTooltip:ClearAllPoints() | 39 GameTooltip:ClearAllPoints() |
40 GameTooltip:SetPoint("TOPRIGHT",self,"TOPLEFT",10,0) | 40 GameTooltip:SetPoint("TOPRIGHT",self,"TOPLEFT",10,0) |
41 if self.spellLink then | |
42 A.tooltipRecipe:SetOwner(GameTooltip) | |
43 A.tooltipRecipe:SetHyperlink(self.spellLink) | |
44 A.tooltipRecipe:Show() | |
45 A.tooltipRecipe:ClearAllPoints() | |
46 A.tooltipRecipe:SetPoint("TOPRIGHT",GameTooltip,"BOTTOMRIGHT") | |
47 end | |
41 end | 48 end |
42 end) | 49 end) |
43 MenuFrame:SetScript("OnLeave",function() | 50 MenuFrame:SetScript("OnLeave",function() |
44 GameTooltip:Hide() | 51 GameTooltip:Hide() |
52 A.tooltipRecipe:Hide() | |
45 end) | 53 end) |
46 A.MenuFrame = MenuFrame | 54 A.MenuFrame = MenuFrame |
47 | 55 |
48 -- Background adaptable vertically | 56 -- Background adaptable vertically |
49 local bg_top = MenuFrame:CreateTexture(nil,"BACKGROUND",nil,0) | 57 local bg_top = MenuFrame:CreateTexture(nil,"BACKGROUND",nil,0) |
285 local color = ITEM_QUALITY_COLORS[quality] | 293 local color = ITEM_QUALITY_COLORS[quality] |
286 TitleText:SetTextColor(color.r, color.g, color.b) | 294 TitleText:SetTextColor(color.r, color.g, color.b) |
287 | 295 |
288 -- Save vars to show the tooltip later | 296 -- Save vars to show the tooltip later |
289 MenuFrame.reagentLink = link | 297 MenuFrame.reagentLink = link |
298 MenuFrame.spellLink = A.data[itemID].spellLink | |
290 | 299 |
291 -- Loop over the available recipes | 300 -- Loop over the available recipes |
292 for _,reagent in ipairs(A.data[itemID]) do | 301 for _,reagent in ipairs(A.data[itemID]) do |
293 if A.data[itemID].spell then | 302 if A.data[itemID].spell then |
294 -- Special spell | 303 -- Special spell |