Thread Tools Display Modes
Prev Previous Post   Next Post Next
05/15/23, 10:34 AM   #1
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 245
Question libaddonmenu dropdown listbox default display

Hey guys im looking for a way to get a dropdown listbox using libaddonmenu to display a saved variable on it when it is NOT dropped down but otherwise NOT have that variable as a choice.

The reason is I'm trying to avoid the "double listing" that happens when the saved variable happens to be one of the choices. If i remove it as a choice the dropdown is blank other than the choices.

Any suggestions? heres what im messing with right now:

Code:
{
	type = "dropdown",
	name = "name",
	tooltip = "tooltip",
	choices = {
		tostring("DISABLED"),
		tostring(MyAddon.savedVariables.noDeposit),
		tostring(GetUnitName("player")),
		},
	getFunc = function() return tostring(MyAddon.savedVariables.noDeposit) end,
	setFunc = function(var) MyAddon.savedVariables.noDeposit = (var) end,
	disabled = function() return not MyAddon.savedVariables.goldDeposit end,
	--width = "half",
},

Last edited by sinnereso : 05/15/23 at 10:52 AM.
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » libaddonmenu dropdown listbox default display


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