function AIRG.CreateConfigMenu() local charList = {} table.insert(charList,"") for charName, _ in pairs(AIRG.vars.data) do if charName ~= AIRG.all and charName ~= AIRG.playerName -- Can't Delete, All, or yourself or the Character displaying then table.insert(charList, charName) -- Set at load time so Charater displaying cannot be filtered here. Check on Click end end local panelData = { type = "panel", name = "AI Research Grid", displayName = "|c8080FFAI Research Grid|r", author = "Stormknight, CrazyDutchGuy and His Dad", version = tostring(AIRG.version), } local optionsData = { -- GENERAL SECTION { type = "header", name = AIRG.L["General Options"], }, { type = "checkbox", name = AIRG.L["Show Motifs"], tooltip = AIRG.L["Show Motifs Long"], getFunc = function() return AIRG.vars.showMotifs end, setFunc = function(newValue) AIRG.vars.showMotifs = newValue AIRG.UI.motifSection:SetHidden(not newValue) AIRG.UI.BottomDivider:SetHidden(not newValue) AIResearchGrid:SetHeight(newValue and 706 or 636) end, }, -- CHARACTER DELETION SECTION { type = "header", name = AIRG.L["Characters"], }, { type = "dropdown", name = AIRG.L["CharacterSelect"], choices = charList, getFunc = function() return "" end, setFunc = function(newValue) AIRG.charToDelete = newValue end, }, { type = "button", name = AIRG.L["Delete"], tooltip = AIRG.L["DeleteDesc"], func = function() AIRG.DeleteCharacter(AIRG.charToDelete) end, }, -- KEYBINDS SECTION { type = "header", name = AIRG.L["Keybinds"], }, { type = "description", text = AIRG.L["Keybind Text"], }, } local LAM2 = LibStub("LibAddonMenu-2.0") LAM2:RegisterAddonPanel(AIRG.name.."Config", panelData) LAM2:RegisterOptionControls(AIRG.name.."Config", optionsData) end -- AIRG.CreateConfigMenu