diff ReagentMaker.lua @ 5:cea9633a6d4e

Added some tooltips and text color
author contrebasse
date Sat, 02 Apr 2011 17:13:16 +0200
parents ed0582126cae
children 43e21c6513e0
line wrap: on
line diff
--- a/ReagentMaker.lua	Sat Apr 02 14:54:55 2011 +0200
+++ b/ReagentMaker.lua	Sat Apr 02 17:13:16 2011 +0200
@@ -76,14 +76,12 @@
 		btn.label = label
 	end -- for
 
-	--[[
 	A.tooltipRecipe = CreateFrame("GameTooltip", "ReagentMaker_tooltipRecipe",UIParent, "GameTooltipTemplate")
 	A.tooltipRecipe:SetFrameStrata("TOOLTIP")
 	A.tooltipRecipe:Hide()
 	A.tooltipReagent = CreateFrame("GameTooltip", "ReagentMaker_tooltipReagent",UIParent, "GameTooltipTemplate")
 	A.tooltipReagent:SetFrameStrata("TOOLTIP")
 	A.tooltipReagent:Hide()
-	--]]
 end -- function
 
 
@@ -190,27 +188,25 @@
 		btn.label:Show()
 	end
 
-	--[[
+	-- Tooltips
 	A.tooltipRecipe:SetOwner(btn)
 	A.tooltipRecipe:SetHyperlink(GetTradeSkillRecipeLink(A.findSkillIndex(reagentID)))
-	A.tooltipRecipe:SetHyperlink(reagentLink)
+	A.tooltipRecipe:Show()
 	A.tooltipRecipe:ClearAllPoints()
-	A.tooltipRecipe:SetPoint("TOPLEFT",btn,"TOPRIGHT")
-	--A.tooltipRecipe:SetSize(100,100)
-	A.tooltipRecipe:Show()
-	A.tooltipReagent:SetOwner(btn)
-	A.tooltipReagent:SetHyperlink(reagentLink)
+	--A.tooltipRecipe:SetPoint("TOPLEFT",btn,"TOPRIGHT")
+	A.tooltipRecipe:SetPoint("BOTTOMLEFT",GameTooltip,"BOTTOMRIGHT")
+
+	A.tooltipReagent:SetOwner(A.tooltipRecipe)
+	local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(A.data[reagentID][1][1])
+	A.tooltipReagent:SetHyperlink(link)
+	A.tooltipReagent:Show()
 	A.tooltipReagent:ClearAllPoints()
-	A.tooltipReagent:SetPoint("TOPLEFT",A.tooltipRecipe,"TOPRIGHT")
-	A.tooltipReagent:Show()
-	--]]
+	A.tooltipReagent:SetPoint("BOTTOMLEFT",A.tooltipRecipe,"BOTTOMRIGHT")
 end
 
 function A.btnLeft(btn)
 	btn.textureHighlight:Hide()
 	btn.label:Hide()
-	--[[
 	A.tooltipRecipe:Hide()
 	A.tooltipReagent:Hide()
-	--]]
 end