Changeset View
Changeset View
Standalone View
Standalone View
stand/lua/menu.lua
Show First 20 Lines • Show All 238 Lines • ▼ Show 20 Lines | entries = function() | ||||
else | else | ||||
boot_entry_1, boot_entry_2 = multi_user, single_user | boot_entry_1, boot_entry_2 = multi_user, single_user | ||||
end | end | ||||
return { | return { | ||||
boot_entry_1, | boot_entry_1, | ||||
boot_entry_2, | boot_entry_2, | ||||
menu_entries.prompt, | menu_entries.prompt, | ||||
menu_entries.reboot, | menu_entries.reboot, | ||||
menu_entries.console, | |||||
{ | { | ||||
entry_type = core.MENU_SEPARATOR, | entry_type = core.MENU_SEPARATOR, | ||||
}, | }, | ||||
{ | { | ||||
entry_type = core.MENU_SEPARATOR, | entry_type = core.MENU_SEPARATOR, | ||||
name = "Options:", | name = "Options:", | ||||
}, | }, | ||||
menu_entries.kernel_options, | menu_entries.kernel_options, | ||||
Show All 23 Lines | single_user = { | ||||
-- Not a standard menu entry function! | -- Not a standard menu entry function! | ||||
alternate_name = "Boot " .. color.highlight("S") .. | alternate_name = "Boot " .. color.highlight("S") .. | ||||
"ingle user " .. color.highlight("[Enter]"), | "ingle user " .. color.highlight("[Enter]"), | ||||
func = function() | func = function() | ||||
core.setSingleUser(true) | core.setSingleUser(true) | ||||
core.boot() | core.boot() | ||||
end, | end, | ||||
alias = {"s", "S"}, | alias = {"s", "S"}, | ||||
}, | |||||
console = { | |||||
entry_type = core.MENU_ENTRY, | |||||
name = function() | |||||
return color.highlight("C") .. "ons: " .. core.getConsoleName() | |||||
kevans: Minor nit; it's a little uglier, but this should be `color.highlight("C") .. "ons: " .. core. | |||||
end, | |||||
func = function() | |||||
core.nextConsoleChoice() | |||||
end, | |||||
alias = {"c", "C"}, | |||||
}, | }, | ||||
prompt = { | prompt = { | ||||
entry_type = core.MENU_RETURN, | entry_type = core.MENU_RETURN, | ||||
name = color.highlight("Esc") .. "ape to loader prompt", | name = color.highlight("Esc") .. "ape to loader prompt", | ||||
func = function() | func = function() | ||||
loader.setenv("autoboot_delay", "NO") | loader.setenv("autoboot_delay", "NO") | ||||
end, | end, | ||||
alias = {core.KEYSTR_ESCAPE}, | alias = {core.KEYSTR_ESCAPE}, | ||||
▲ Show 20 Lines • Show All 244 Lines • Show Last 20 Lines |
Minor nit; it's a little uglier, but this should be color.highlight("C") .. "ons: " .. core.getConsoleName() to highlight the key alias.