From 94dc71a1359df1bfbd1ebcb59c6e96c5eb1fb1f4 Mon Sep 17 00:00:00 2001 From: Snakybo Date: Wed, 23 Sep 2020 21:42:35 +0200 Subject: [PATCH] Fix GLOBAL target in new target list --- Config/Bindings.lua | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/Config/Bindings.lua b/Config/Bindings.lua index ea933441..bb025f4f 100644 --- a/Config/Bindings.lua +++ b/Config/Bindings.lua @@ -846,33 +846,9 @@ local function DrawTargetSelectionNewUnit(container, binding) end end - local items = { - _NONE_ = L["CFG_UI_ACTION_TARGET_UNIT_NONE"], - PLAYER = L["CFG_UI_ACTION_TARGET_UNIT_PLAYER"], - TARGET = L["CFG_UI_ACTION_TARGET_UNIT_TARGET"], - MOUSEOVER = L["CFG_UI_ACTION_TARGET_UNIT_MOUSEOVER"], - FOCUS = L["CFG_UI_ACTION_TARGET_UNIT_FOCUS"], - CURSOR = L["CFG_UI_ACTION_TARGET_UNIT_CURSOR"], - PARTY_1 = L["CFG_UI_ACTION_TARGET_UNIT_PARTY"]:format("1"), - PARTY_2 = L["CFG_UI_ACTION_TARGET_UNIT_PARTY"]:format("2"), - PARTY_3 = L["CFG_UI_ACTION_TARGET_UNIT_PARTY"]:format("3"), - PARTY_4 = L["CFG_UI_ACTION_TARGET_UNIT_PARTY"]:format("4"), - PARTY_5 = L["CFG_UI_ACTION_TARGET_UNIT_PARTY"]:format("5") - } - - local order = { - "_NONE_", - "PLAYER", - "TARGET", - "MOUSEOVER", - "FOCUS", - "CURSOR", - "PARTY_1", - "PARTY_2", - "PARTY_3", - "PARTY_4", - "PARTY_5", - } + local items, order = GetCommonTargetUnits() + items["_NONE_"] = L["CFG_UI_ACTION_TARGET_UNIT_NONE"] + table.insert(order, 1, "_NONE_") local widget = GUI:Dropdown(nil, items, order, nil, { unit = "_NONE_" }, "unit") widget:SetCallback("OnValueChanged", OnValueChanged)