1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 05:48:43 +00:00

LCD corner screen handler lambda

This commit is contained in:
Scott Lahteine 2019-11-07 00:23:35 -06:00
parent 711703dcd1
commit 84ce3a6bea

View File

@ -88,23 +88,25 @@ static inline void _lcd_level_bed_corners_homing() {
_lcd_draw_homing(); _lcd_draw_homing();
if (all_axes_homed()) { if (all_axes_homed()) {
bed_corner = 0; bed_corner = 0;
MenuItem_confirm::select_screen( ui.goto_screen([]{
GET_TEXT(MSG_BUTTON_NEXT), GET_TEXT(MSG_BUTTON_DONE), MenuItem_confirm::select_screen(
_lcd_goto_next_corner, GET_TEXT(MSG_BUTTON_NEXT), GET_TEXT(MSG_BUTTON_DONE),
[]{ _lcd_goto_next_corner,
#if HAS_LEVELING []{
set_bed_leveling_enabled(leveling_was_active); #if HAS_LEVELING
#endif set_bed_leveling_enabled(leveling_was_active);
ui.goto_previous_screen_no_defer(); #endif
}, ui.goto_previous_screen_no_defer();
GET_TEXT( },
#if ENABLED(LEVEL_CENTER_TOO) GET_TEXT(
MSG_LEVEL_BED_NEXT_POINT #if ENABLED(LEVEL_CENTER_TOO)
#else MSG_LEVEL_BED_NEXT_POINT
MSG_NEXT_CORNER #else
#endif MSG_NEXT_CORNER
), (PGM_P)nullptr, PSTR("?") #endif
), (PGM_P)nullptr, PSTR("?")
); );
});
ui.set_selection(true); ui.set_selection(true);
_lcd_goto_next_corner(); _lcd_goto_next_corner();
} }