Appel
Conditions.talent.dropdown(parent, title, changed)
Enregistrez la dépendance Conditions.talent.dropdown, puis appelez-la sous ce nom. Un appel par espace de noms ne transmet pas self : utilisez un appel avec deux-points ou passez l'objet vous-même.
Ce qu'elle fait
Creates a full-width condition dropdown labeled title for the talent condition editors, forwards each selection to changed, and adds it to parent. The caller fills its choices later through the widget's configure function.
Arguments
| Nom | Type | Ce qu'elle fait |
|---|---|---|
parent | table | Condition widget group the control is added to. |
title | string | Label shown above the dropdown. |
changed | function | Called with the selected key whenever the selection changes. |
Retours
| 1 | RMConditionSelector | The dropdown, already added to parent. |
|---|
Éditions
Les fonctions utilitaires intégrées sont enregistrées sur toutes les éditions. Ce qui diffère, c'est l'API du jeu qu'elles lisent ; quand l'une manque, la fonction utilitaire se rabat sur une alternative ou renvoie nil avec une raison.
Elle ne lit directement aucune API du jeu.
Comment l'addon l'appelle
Conditions.talent.gridWidgettierPicker=dropdown(box,L["Tier"],function(selected)Conditions.talent.traitsWidgetspecPicker=dropdown(box,L["Specialization"],function(selected)Conditions.talent.treePickerlocal picker=dropdown(parent,L['Talent tree'],function(selected) value.tree=selected;update() end)Conditions.talent.treeWidgettreePicker=dropdown(box,L["Talent Tree"],function(selected)
Source
Conditions/talent.lua, ligne 136. En lecture seule dans le jeu ; Dupliquer crée une copie modifiable.
Conditions.talent.dropdown(parent, title, changed)
local widget=addon:CreateConditionDropdown();widget:SetFullWidth(true);widget:SetLabel(title)
widget:SetCallback("OnValueChanged",function(_,_,value) changed(value) end);parent:AddChild(widget)
return widget