From ef625845801f19c0884a695aafb56bbfd7d6245f Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Fri, 16 Feb 2018 22:17:30 +0000 Subject: [PATCH] stand/lua: Allow MENU_RETURN items to have a func, fix escape to prompt --- stand/lua/menu.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index e97ec07a4b53..683dbb57022b 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -161,6 +161,9 @@ menu.welcome = { name = function() return color.highlight("Esc").."ape to loader prompt"; end, + func = function() + loader.setenv("autoboot_delay", "NO") + end, alias = {core.KEYSTR_ESCAPE} }, @@ -301,6 +304,10 @@ function menu.run(m) -- recurse cont = menu.run(sel_entry.submenu()); elseif (sel_entry.entry_type == core.MENU_RETURN) then + -- allow entry to have a function/side effect + if (sel_entry.func ~= nil) then + sel_entry.func(); + end -- break recurse cont = false; end