• DermaMenu:AddSubMenu() not working
    0 replies, posted
Arg. I have a dermamenu that is opened on a button click. It is a menu of two submenus, and those submenus each have two options. However, the menus of the two submenus are not being built. Here's the code: [lua] optBtn.DoClick = function() local optMenu = DermaMenu() local shuffleMenu = function(menu) menu:AddOption("On", function() RunConsoleCommand("mp3_shuffle", "1") end) menu:AddOption("Off", function() RunConsoleCommand("mp3_shuffle", "0") end) end local repMenu = function(menu) menu:AddOption("On", function() RunConsoleCommand("mp3_repeat", "1") end) menu:AddOption("Off", function() RunConsoleCommand("mp3_repeat", "0") end) end optMenu:AddSubMenu("Shuffle", nil, function(NEWMENU) shuffleMenu(NEWMENU) end) optMenu:AddSubMenu("Repeat", nil, function(NEWMENU) repMenu(NEWMENU) end) optMenu:Open() end[/lua] There are no errors. [editline]10:09PM[/editline] And how in blazes does assmod do SetImage on the thing returned by :AddSubMenu? When I do it, it says there's no such thing as SetImage. Andy is a wizard with the DermaMenu. Actually nevermind, I see how he did it in the ass_client.lua. It's still awesome though.
Sorry, you need to Log In to post a reply to this thread.