Aufruf als
Conditions.talent.icon(parent, value, spec)
Erfassen Sie die Abhängigkeit Conditions.talent.icon und rufen Sie sie dann unter diesem Namen auf. Ein Aufruf über den Namensraum übergibt kein self: Verwenden Sie einen Doppelpunkt-Aufruf oder übergeben Sie das Objekt selbst.
Was sie bewirkt
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.
Argumente
| Name | Typ | Was sie bewirkt |
|---|---|---|
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. |
Rückgabewerte
| 1 | RMConditionIcon | The icon widget, already added to parent. |
|---|
Editionen
Integrierte Hilfsfunktionen werden auf jeder Edition registriert. Unterschiedlich ist die Spiel-API, die sie lesen; fehlt eine, weicht die Hilfsfunktion aus oder gibt nil mit einem Grund zurück.
- Auf dieser Edition nicht verfügbar (den Grund nennt der Tooltip)
- Nur, solange Blizzards Ersatz für veraltete Funktionen aktiv ist
| Spiel-API | |||||
|---|---|---|---|---|---|
GameTooltip |
Wie das Addon sie aufruft
Conditions.talent.gridWidgetlocal talentIcon=icon(box,value,spec)Conditions.talent.traitsWidgettalentIcon=icon(box,value,spec)Conditions.talent.treeWidgettalentIcon=icon(box,value,spec)
Abhängigkeiten
PLACEHOLDER(builtin:Conditions/talent.lua:PLACEHOLDER)info→Conditions.talent.info
Quelle
Conditions/talent.lua, Zeile 167. Im Spiel schreibgeschützt; Duplizieren erstellt eine bearbeitbare Kopie.
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




