View Single Post
09-19-19, 09:36 PM   #7
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
Originally Posted by Fizzlemizz View Post
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:
  1. dm = CreateFrame("FRAME", "SLFG_RoleMenu", panel, "UIDropDownMenuTemplate")
  2.     dm:SetPoint("LEFT", SLFG_RoleText, "RIGHT", 0, -2)
  3.     UIDropDownMenu_SetWidth(dm, 70)
  4.     UIDropDownMenu_Initialize(dm, SLFG_RoleMenu_Init)
  5.  
  6. function SLFG_RoleMenu_Init(self)
  7.     local info = UIDropDownMenu_CreateInfo()
  8.    
  9.     info.text = "Tank"
  10.     info.value = 0
  11.     info.func = function(self)
  12.         UIDropDownMenu_SetSelectedValue(self.owner, self.value)
  13.         SLFG_Settings.role = "TANK"
  14.         SLFG_UpdateMsg()
  15.         end
  16.     info.owner = self
  17.     info.check = nil
  18.     info.icon = nil
  19.     UIDropDownMenu_AddButton(info)
  20.    
  21.     info.text = "Healer"
  22.     info.value = 1
  23.     info.func = function(self)
  24.         UIDropDownMenu_SetSelectedValue(self.owner, self.value)
  25.         SLFG_Settings.role = "HEALER"
  26.         SLFG_UpdateMsg()
  27.         end
  28.     info.owner = self
  29.     info.check = nil
  30.     info.icon = nil
  31.     UIDropDownMenu_AddButton(info)
  32.    
  33.     info.text = "DPS"
  34.     info.value = 2
  35.     info.func = function(self)
  36.         UIDropDownMenu_SetSelectedValue(self.owner, self.value)
  37.         SLFG_Settings.role = "DPS"
  38.         SLFG_UpdateMsg()
  39.         end
  40.     info.owner = self
  41.     info.check = nil
  42.     info.icon = nil
  43.     UIDropDownMenu_AddButton(info)
  44.    
  45. end
  Reply With Quote