Mercurial > wow > reagentmaker
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 4:3a1997d21468 | 5:cea9633a6d4e |
|---|---|
| 74 label:SetJustifyV("TOP") | 74 label:SetJustifyV("TOP") |
| 75 label:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE") | 75 label:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE") |
| 76 btn.label = label | 76 btn.label = label |
| 77 end -- for | 77 end -- for |
| 78 | 78 |
| 79 --[[ | |
| 80 A.tooltipRecipe = CreateFrame("GameTooltip", "ReagentMaker_tooltipRecipe",UIParent, "GameTooltipTemplate") | 79 A.tooltipRecipe = CreateFrame("GameTooltip", "ReagentMaker_tooltipRecipe",UIParent, "GameTooltipTemplate") |
| 81 A.tooltipRecipe:SetFrameStrata("TOOLTIP") | 80 A.tooltipRecipe:SetFrameStrata("TOOLTIP") |
| 82 A.tooltipRecipe:Hide() | 81 A.tooltipRecipe:Hide() |
| 83 A.tooltipReagent = CreateFrame("GameTooltip", "ReagentMaker_tooltipReagent",UIParent, "GameTooltipTemplate") | 82 A.tooltipReagent = CreateFrame("GameTooltip", "ReagentMaker_tooltipReagent",UIParent, "GameTooltipTemplate") |
| 84 A.tooltipReagent:SetFrameStrata("TOOLTIP") | 83 A.tooltipReagent:SetFrameStrata("TOOLTIP") |
| 85 A.tooltipReagent:Hide() | 84 A.tooltipReagent:Hide() |
| 86 --]] | |
| 87 end -- function | 85 end -- function |
| 88 | 86 |
| 89 | 87 |
| 90 -- Function run avter selecting a item in the tradeskill window | 88 -- Function run avter selecting a item in the tradeskill window |
| 91 function A.ProcessReagent(btn, ...) | 89 function A.ProcessReagent(btn, ...) |
| 188 btn.label:SetTextColor(0, 5, 0, 1) | 186 btn.label:SetTextColor(0, 5, 0, 1) |
| 189 end | 187 end |
| 190 btn.label:Show() | 188 btn.label:Show() |
| 191 end | 189 end |
| 192 | 190 |
| 193 --[[ | 191 -- Tooltips |
| 194 A.tooltipRecipe:SetOwner(btn) | 192 A.tooltipRecipe:SetOwner(btn) |
| 195 A.tooltipRecipe:SetHyperlink(GetTradeSkillRecipeLink(A.findSkillIndex(reagentID))) | 193 A.tooltipRecipe:SetHyperlink(GetTradeSkillRecipeLink(A.findSkillIndex(reagentID))) |
| 196 A.tooltipRecipe:SetHyperlink(reagentLink) | 194 A.tooltipRecipe:Show() |
| 197 A.tooltipRecipe:ClearAllPoints() | 195 A.tooltipRecipe:ClearAllPoints() |
| 198 A.tooltipRecipe:SetPoint("TOPLEFT",btn,"TOPRIGHT") | 196 --A.tooltipRecipe:SetPoint("TOPLEFT",btn,"TOPRIGHT") |
| 199 --A.tooltipRecipe:SetSize(100,100) | 197 A.tooltipRecipe:SetPoint("BOTTOMLEFT",GameTooltip,"BOTTOMRIGHT") |
| 200 A.tooltipRecipe:Show() | 198 |
| 201 A.tooltipReagent:SetOwner(btn) | 199 A.tooltipReagent:SetOwner(A.tooltipRecipe) |
| 202 A.tooltipReagent:SetHyperlink(reagentLink) | 200 local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(A.data[reagentID][1][1]) |
| 201 A.tooltipReagent:SetHyperlink(link) | |
| 202 A.tooltipReagent:Show() | |
| 203 A.tooltipReagent:ClearAllPoints() | 203 A.tooltipReagent:ClearAllPoints() |
| 204 A.tooltipReagent:SetPoint("TOPLEFT",A.tooltipRecipe,"TOPRIGHT") | 204 A.tooltipReagent:SetPoint("BOTTOMLEFT",A.tooltipRecipe,"BOTTOMRIGHT") |
| 205 A.tooltipReagent:Show() | |
| 206 --]] | |
| 207 end | 205 end |
| 208 | 206 |
| 209 function A.btnLeft(btn) | 207 function A.btnLeft(btn) |
| 210 btn.textureHighlight:Hide() | 208 btn.textureHighlight:Hide() |
| 211 btn.label:Hide() | 209 btn.label:Hide() |
| 212 --[[ | |
| 213 A.tooltipRecipe:Hide() | 210 A.tooltipRecipe:Hide() |
| 214 A.tooltipReagent:Hide() | 211 A.tooltipReagent:Hide() |
| 215 --]] | |
| 216 end | 212 end |
