Llamar como
Conditions.talent.dropdown(parent, title, changed)
Registra la dependencia Conditions.talent.dropdown y luego llámala con ese nombre. Una llamada con espacio de nombres no pasa self: usa una llamada con dos puntos o pasa tú mismo el objeto.
Qué hace
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.
Argumentos
| Nombre | Tipo | Qué hace |
|---|---|---|
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. |
Retornos
| 1 | RMConditionSelector | The dropdown, already added to parent. |
|---|
Ediciones
Las funciones auxiliares integradas se registran en todas las ediciones. Lo que cambia es la API del juego que leen; donde falta alguna, la función auxiliar recurre a una alternativa o devuelve nil con un motivo.
No lee directamente ninguna API del juego.
Cómo la llama el 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)
Código fuente
Conditions/talent.lua, línea 136. Solo lectura en el juego; Duplicar crea una copia editable.
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