From 43f7d9d1b25b562c93816707e2620c3bb283080e Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Thu, 1 Mar 2018 02:04:26 +0000 Subject: [PATCH] lualoader: Dedup these "Return to main menu" entries --- stand/lua/menu.lua | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index d6233cc04a30..6e714f9ac080 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -39,6 +39,10 @@ local drawer = require("drawer") local 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) if value then @@ -97,11 +101,7 @@ menu.handlers = { menu.boot_environments = { entries = { -- return to welcome menu - { - entry_type = core.MENU_RETURN, - name = "Back to main menu" .. - color.highlight(" [Backspace]"), - }, + return_menu_entry, { entry_type = core.MENU_CAROUSEL_ENTRY, carousel_id = "be_active", @@ -149,11 +149,7 @@ menu.boot_environments = { menu.boot_options = { entries = { -- return to welcome menu - { - entry_type = core.MENU_RETURN, - name = "Back to main menu" .. - color.highlight(" [Backspace]"), - }, + return_menu_entry, -- load defaults { entry_type = core.MENU_ENTRY,