I'm trying to set up another menu level with a dropdown list based off of a list of characters which is created by a function (i.e. I want to read the alt characters and have a dropdown list off of one of my other menu settings). I can't seem to get this to work using option tables but have done it before using dewdrop inside a loop. Can I use FactionItemsFu.OnMenuRequest = optionsTable and also use :AddImpliedMenuOptions([level]) function to set a dropdown list using dewdrop? I have the following code to get alt char data, this only gets characters that you have run this addon with -
function FactionItemsFu:GetAltCharData()
local infoChar = {}
for _, charNames in pairs(self.db.chars) do
infoChar = charNames
end
return infoChar
end
I'd use the following code in the dewdrop menu request to have a drop downlist that I can then call a function to display alt char data when one is selected.
if level == 2 then
for _,cNames in ipairs(self.GetAltCharData) do
dewdrop:AddLine(
'text',
cNames,
'func', self.foo,
'arg1', self,
'arg2', cNames,
'checked', self:foo2(cNames)
)
end
end
any help is appreciated.
Thanks,
LordRhys
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'd use the following code in the dewdrop menu request to have a drop downlist that I can then call a function to display alt char data when one is selected.
any help is appreciated.
Thanks,
LordRhys