lualoader: Directly reference submenu definition with submenu key

This commit is contained in:
Kyle Evans 2018-02-21 04:23:13 +00:00
parent dd65496a04
commit 9a28f948ee
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329698

View File

@ -75,7 +75,7 @@ menu.handlers = {
end, end,
[core.MENU_SUBMENU] = function(current_menu, entry) [core.MENU_SUBMENU] = function(current_menu, entry)
-- recurse -- recurse
return menu.run(entry.submenu()) return menu.run(entry.submenu)
end, end,
[core.MENU_RETURN] = function(current_menu, entry) [core.MENU_RETURN] = function(current_menu, entry)
-- allow entry to have a function/side effect -- allow entry to have a function/side effect
@ -313,9 +313,7 @@ menu.welcome = {
return "Boot " .. color.highlight("O") .. return "Boot " .. color.highlight("O") ..
"ptions" "ptions"
end, end,
submenu = function() submenu = menu.boot_options,
return menu.boot_options
end,
alias = {"o", "O"} alias = {"o", "O"}
}, },
}, },