mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-07-25 07:33:56 -06:00
Add TURBO_BACK_MENU_ITEM option (#14991)
This commit is contained in:
parent
0cc524b84f
commit
5e777601f3
102 changed files with 323 additions and 4 deletions
|
@ -88,10 +88,21 @@ void MarlinUI::save_previous_screen() {
|
|||
screen_history[screen_history_depth++] = { currentScreen, encoderPosition, encoderTopLine, screen_items };
|
||||
}
|
||||
|
||||
void MarlinUI::goto_previous_screen() {
|
||||
void MarlinUI::goto_previous_screen(
|
||||
#if ENABLED(TURBO_BACK_MENU_ITEM)
|
||||
const bool is_back/*=false*/
|
||||
#endif
|
||||
) {
|
||||
#if DISABLED(TURBO_BACK_MENU_ITEM)
|
||||
constexpr bool is_back = false;
|
||||
#endif
|
||||
if (screen_history_depth > 0) {
|
||||
menuPosition &sh = screen_history[--screen_history_depth];
|
||||
goto_screen(sh.menu_function, sh.encoder_position, sh.top_line, sh.items);
|
||||
goto_screen(sh.menu_function,
|
||||
is_back ? 0 : sh.encoder_position,
|
||||
is_back ? 0 : sh.top_line,
|
||||
sh.items
|
||||
);
|
||||
}
|
||||
else
|
||||
return_to_status();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue