mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-01-22 17:52:57 +00:00
✨ GENERIC_BACK_MENU_ITEM
This commit is contained in:
parent
2fd1c48e1a
commit
bebf5dc6ab
2 changed files with 10 additions and 4 deletions
|
@ -1554,6 +1554,9 @@
|
|||
// BACK menu items keep the highlight at the top
|
||||
//#define TURBO_BACK_MENU_ITEM
|
||||
|
||||
// BACK menu items show "Back" instead of the previous menu name
|
||||
//#define GENERIC_BACK_MENU_ITEM
|
||||
|
||||
// Insert a menu for preheating at the top level to allow for quick access
|
||||
//#define PREHEAT_SHORTCUT_MENU_ITEM
|
||||
|
||||
|
|
|
@ -426,12 +426,15 @@ class MenuItem_bool : public MenuEditItemBase {
|
|||
|
||||
// Predefined menu item types //
|
||||
|
||||
#if DISABLED(NO_BACK_MENU_ITEM)
|
||||
#define BACK_ITEM_F(FLABEL) MENU_ITEM_F(back, FLABEL)
|
||||
#define BACK_ITEM(LABEL) MENU_ITEM(back, LABEL)
|
||||
#else
|
||||
#if ENABLED(NO_BACK_MENU_ITEM)
|
||||
#define BACK_ITEM_F(FLABEL) NOOP
|
||||
#define BACK_ITEM(LABEL) NOOP
|
||||
#elif ENABLED(GENERIC_BACK_MENU_ITEM)
|
||||
#define BACK_ITEM_F(V...) MENU_ITEM_F(back, GET_TEXT_F(MSG_BACK))
|
||||
#define BACK_ITEM(V...) MENU_ITEM(back, MSG_BACK)
|
||||
#else
|
||||
#define BACK_ITEM_F(FLABEL) MENU_ITEM_F(back, FLABEL)
|
||||
#define BACK_ITEM(LABEL) MENU_ITEM(back, LABEL)
|
||||
#endif
|
||||
|
||||
#define ACTION_ITEM_N_S_F(N, S, FLABEL, ACTION) MENU_ITEM_N_S_F(function, N, S, FLABEL, ACTION)
|
||||
|
|
Loading…
Reference in a new issue