Reference › Function reference › Conditions

Conditions.talent.dropdown

dependency

Call as

Conditions.talent.dropdown(parent, title, changed)

Record the dependency Conditions.talent.dropdown, 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 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

NameTypeWhat it does
parenttableCondition widget group the control is added to.
titlestringLabel shown above the dropdown.
changedfunctionCalled with the selected key whenever the selection changes.

Returns

1RMConditionSelectorThe dropdown, 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.

It reads no game API directly.

How the addon calls it

Source

Conditions/talent.lua, line 136. Read only in game; Duplicate makes an editable copy.

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

Back to Function reference