Call as
Conditions.talent.icon(parent, value, spec)
Record the dependency Conditions.talent.icon, then call it by that name. A namespaced call does not pass self: use a colon call or pass the object yourself.
What it does
Creates the 44-pixel talent icon for the TALENT editors, showing the referenced talent's icon and, on hover, its spell tooltip (or its name), and adds it to parent.
Arguments
| Name | Type | What it does |
|---|---|---|
parent | table | Condition widget group the control is added to. |
value | table | Saved TALENT condition settings the icon reflects. |
spec | number | nil | Specialization the editor is for; on progression clients a value from 1 to 4 also selects the talent group to read. |
Returns
| 1 | RMConditionIcon | The icon widget, already added to parent. |
|---|
Editions
Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.
- Not available on that edition (the reason is in the tooltip)
- Only while Blizzard's deprecation fallbacks are on
| Game API | |||||
|---|---|---|---|---|---|
GameTooltip |
How the addon calls it
Conditions.talent.gridWidgetlocal talentIcon=icon(box,value,spec)Conditions.talent.traitsWidgettalentIcon=icon(box,value,spec)Conditions.talent.treeWidgettalentIcon=icon(box,value,spec)
Dependencies
PLACEHOLDER(builtin:Conditions/talent.lua:PLACEHOLDER)info→Conditions.talent.info
Source
Conditions/talent.lua, line 167. Read only in game; Duplicate makes an editable copy.
Conditions.talent.icon(parent, value, spec)
local widget=addon:CreateConditionIcon();widget:SetWidth(64);widget:SetImageSize(60,60)
local current=info(value,spec);widget:SetImage(current and current.icon or PLACEHOLDER)
widget:SetCallback("OnEnter",function()
local observed=info(value,spec)
if observed then
GameTooltip:SetOwner(widget.frame,"ANCHOR_BOTTOMRIGHT",3)
if observed.spellID then GameTooltip:SetHyperlink("spell:"..observed.spellID)
else GameTooltip:SetText(observed.name) end
end
end)
widget:SetCallback("OnLeave",function() if GameTooltip:IsOwned(widget.frame) then GameTooltip:Hide() end end)
parent:AddChild(widget)
return widget




