Quantcast HELP: DropdownMenu issue - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-19-19, 07:21 AM   #1
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
HELP: DropdownMenu issue

Alright, so admittedly I've been out of the modding loop for a while now so pardon if the fix for this is obvious and I'm missing it.

I'm having an issue setting up a dropdown menu where after selecting an entry it's marking every other option past it as well:



I looked back on my previous projects and see that I've set them up the same way and they work 100% fine. I've been staring at it for 2 days and can't seem to find anything wrong. Anyone see something I've missed here?

Lua Code:
  1. SLFG_DungeonList = {
  2.     "Ragefire Chasm (RFC)",
  3.     "Wailing Caverns (WC)",
  4.     "Deadmines (VC)",
  5.     "Shadowfang Keep (SFK)",
  6.     "Blackfathom Deeps (BFD)",
  7.     "Stockade (Stocks)",
  8.     "Gnomeregan (Gnomer)",
  9.     "Razorfen Kraul (RFK)",
  10.     "SM: Graveyard (GY)",
  11.     "SM: Library (Lib)",
  12.     "SM: Armory (Armory)",
  13.     "SM: Cathedral (Cath)",
  14.     "Razorfen Downs (RFD)",
  15.     "Uldaman (Ulda)",
  16.     "Zul'Farrack (ZF)",
  17.     "Maraudon (Mara)",
  18.     "Sunken Temple (ST)",
  19.     "Blackrock Depths (BRD)",
  20.     "Lower Blackrock Spire (LBRS)",
  21.     "Upper Blackrock Spire (UBRS)",
  22.     -- "Dire Maul: East (DME)",
  23.     -- "Dire Maul: West (DMW)",
  24.     -- "Dire Maul: North (DMN)",
  25.     "Scholomance (Scholo)",
  26.     "Stratholme: Live (Strat Live)",
  27.     "Stratholme: Dead (Strat Dead)",
  28.     "Molten Core (MC)",
  29.     "Onyxia's Lair (Ony)" }
  30.  
  31. -- DropMenu Creation
  32. dm = CreateFrame("FRAME", "SLFG_DungeonMenu", panel, "UIDropDownMenuTemplate")
  33.             dm:SetPoint("LEFT", "SLFG_DungeonText", "RIGHT", 0, -2)
  34.             UIDropDownMenu_SetWidth(dm, 190)
  35.             UIDropDownMenu_Initialize(dm, SLFG_DungeonMenu_Init)
  36.  
  37. -- DropMenu Setup
  38. function SLFG_DungeonMenu_Init(self)
  39.     local level = level or 1
  40.     local info = UIDropDownMenu_CreateInfo()
  41.    
  42.     for i = 1,#SLFG_DungeonList do
  43.         info.text = SLFG_DungeonList[i]
  44.         info.value = i-1        -- value should start at 0
  45.         info.func = function(self)
  46.             UIDropDownMenu_SetSelectedValue(self.owner, self.value)
  47.             SLFG_Settings.dungeon = SLFG_DungeonList[i]
  48.             print(SLFG_Settings.dungeon.. " has been set.")
  49.             end
  50.         info.owner = self
  51.         info.check = nil
  52.         info.icon = nil
  53.         UIDropDownMenu_AddButton(info, level)
  54.     end
  55. end
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » HELP: DropdownMenu issue

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off