• 0

    posted a message on HELP: DropDownMenu Issue

    Issue has been fixed.

    Posted in: AddOn HELP!
  • 0

    posted a message on 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.  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?

    SLFG_DungeonList = {
    	"Ragefire Chasm (RFC)",
    	"Wailing Caverns (WC)",
    	"Deadmines (VC)",
    	"Shadowfang Keep (SFK)",
    	"Blackfathom Deeps (BFD)",
    	"Stockade (Stocks)",
    	"Gnomeregan (Gnomer)",
    	"Razorfen Kraul (RFK)",
    	"SM: Graveyard (GY)",
    	"SM: Library (Lib)",
    	"SM: Armory (Armory)",
    	"SM: Cathedral (Cath)",
    	"Razorfen Downs (RFD)",
    	"Uldaman (Ulda)",
    	"Zul'Farrack (ZF)",
    	"Maraudon (Mara)",
    	"Sunken Temple (ST)",
    	"Blackrock Depths (BRD)",
    	"Lower Blackrock Spire (LBRS)",
    	"Upper Blackrock Spire (UBRS)",
    	-- "Dire Maul: East (DME)",
    	-- "Dire Maul: West (DMW)",
    	-- "Dire Maul: North (DMN)",
    	"Scholomance (Scholo)",
    	"Stratholme: Live (Strat Live)",
    	"Stratholme: Dead (Strat Dead)",
    	"Molten Core (MC)",
    	"Onyxia's Lair (Ony)" }
    
    -- DropMenu Creation
    dm = CreateFrame("FRAME", "SLFG_DungeonMenu", panel, "UIDropDownMenuTemplate")
    	dm:SetPoint("LEFT", "SLFG_DungeonText", "RIGHT", 0, -2)
    	UIDropDownMenu_SetWidth(dm, 190)
    	UIDropDownMenu_Initialize(dm, SLFG_DungeonMenu_Init)
    
    -- DropMenu Setup
    function SLFG_DungeonMenu_Init(self)
    	local info = UIDropDownMenu_CreateInfo()
    	
    	for i = 1,#SLFG_DungeonList do
    		info.text = SLFG_DungeonList[i]
    		info.value = i-1		-- value should start at 0
    		info.func = function(self)
    			UIDropDownMenu_SetSelectedValue(self.owner, self.value)
    			SLFG_Settings.dungeon = SLFG_DungeonList[i]
    			print(SLFG_Settings.dungeon.. " has been set.")
    			end
    		info.owner = self
    		info.check = nil
    		info.icon = nil
    		UIDropDownMenu_AddButton(info)
    	end
    end
    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.