lualoader: Dedup these "Return to main menu" entries

This commit is contained in:
Kyle Evans 2018-03-01 02:04:26 +00:00
parent fadd3f8a66
commit 43f7d9d1b2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330138

View File

@ -39,6 +39,10 @@ local drawer = require("drawer")
local menu = {} local menu = {}
local drawn_menu local drawn_menu
local return_menu_entry = {
entry_type = core.MENU_RETURN,
name = "Back to main menu" .. color.highlight(" [Backspace]"),
}
local function OnOff(str, value) local function OnOff(str, value)
if value then if value then
@ -97,11 +101,7 @@ menu.handlers = {
menu.boot_environments = { menu.boot_environments = {
entries = { entries = {
-- return to welcome menu -- return to welcome menu
{ return_menu_entry,
entry_type = core.MENU_RETURN,
name = "Back to main menu" ..
color.highlight(" [Backspace]"),
},
{ {
entry_type = core.MENU_CAROUSEL_ENTRY, entry_type = core.MENU_CAROUSEL_ENTRY,
carousel_id = "be_active", carousel_id = "be_active",
@ -149,11 +149,7 @@ menu.boot_environments = {
menu.boot_options = { menu.boot_options = {
entries = { entries = {
-- return to welcome menu -- return to welcome menu
{ return_menu_entry,
entry_type = core.MENU_RETURN,
name = "Back to main menu" ..
color.highlight(" [Backspace]"),
},
-- load defaults -- load defaults
{ {
entry_type = core.MENU_ENTRY, entry_type = core.MENU_ENTRY,