Chiamala come
Conditions.talent.dropdown(parent, title, changed)
Registra la dipendenza Conditions.talent.dropdown, poi chiamala con quel nome. Una chiamata con spazio dei nomi non passa self: usa una chiamata con i due punti o passa tu l'oggetto.
Cosa fa
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.
Argomenti
| Nome | Tipo | Cosa fa |
|---|---|---|
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. |
Valori restituiti
| 1 | RMConditionSelector | The dropdown, already added to parent. |
|---|
Edizioni
Le funzioni di supporto integrate sono registrate su ogni edizione. Ciò che cambia è l'API di gioco che leggono; dove ne manca una, la funzione di supporto ripiega su un'alternativa o restituisce nil con un motivo.
Non legge direttamente alcuna API di gioco.
Come la chiama l'addon
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)
Sorgente
Conditions/talent.lua, riga 136. Nel gioco è in sola lettura; Duplica crea una copia modificabile.
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