Originally Posted by Fizzlemizz
wiped the info table each iteration
|
No go for me, still doing it. Shift gears a sec, it's also happening on my non-looped dropdown, which has ruled out any potential screwups I may have done with the loop setup:
Lua Code:
dm = CreateFrame("FRAME", "SLFG_RoleMenu", panel, "UIDropDownMenuTemplate")
dm:SetPoint("LEFT", SLFG_RoleText, "RIGHT", 0, -2)
UIDropDownMenu_SetWidth(dm, 70)
UIDropDownMenu_Initialize(dm, SLFG_RoleMenu_Init)
function SLFG_RoleMenu_Init(self)
local info = UIDropDownMenu_CreateInfo()
info.text = "Tank"
info.value = 0
info.func = function(self)
UIDropDownMenu_SetSelectedValue(self.owner, self.value)
SLFG_Settings.role = "TANK"
SLFG_UpdateMsg()
end
info.owner = self
info.check = nil
info.icon = nil
UIDropDownMenu_AddButton(info)
info.text = "Healer"
info.value = 1
info.func = function(self)
UIDropDownMenu_SetSelectedValue(self.owner, self.value)
SLFG_Settings.role = "HEALER"
SLFG_UpdateMsg()
end
info.owner = self
info.check = nil
info.icon = nil
UIDropDownMenu_AddButton(info)
info.text = "DPS"
info.value = 2
info.func = function(self)
UIDropDownMenu_SetSelectedValue(self.owner, self.value)
SLFG_Settings.role = "DPS"
SLFG_UpdateMsg()
end
info.owner = self
info.check = nil
info.icon = nil
UIDropDownMenu_AddButton(info)
end