Skip to content

Commit

Permalink
Use inline enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 28, 2020
1 parent bb30584 commit d53d9ff
Showing 1 changed file with 6 additions and 28 deletions.
34 changes: 6 additions & 28 deletions Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,39 +67,17 @@ void TuneMenu::onRedraw(draw_mode_t what) {
cmd.colors(normal_btn)
.font(font_medium)
.tag(2).button( TEMPERATURE_POS, GET_TEXT_F(MSG_TEMPERATURE))
.enabled((!isPrinting()) || isPrintingFromMediaPaused())
.enabled(!isPrinting() || isPrintingFromMediaPaused())
.tag(3).button( FIL_CHANGE_POS, GET_TEXT_F(MSG_FILAMENTCHANGE))
.enabled(
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
1
#endif
)
.enabled(EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR))
.tag(9).button( FILAMENT_POS, GET_TEXT_F(MSG_FILAMENT))
.enabled(
#if HAS_BED_PROBE || ENABLED(BABYSTEPPING)
1
#endif
)
.tag(4).button( NUDGE_NOZ_POS, GET_TEXT_F(
#if ENABLED(BABYSTEPPING)
MSG_NUDGE_NOZZLE
#else
MSG_ZPROBE_ZOFFSET
#endif
))
.enabled(EITHER(HAS_BED_PROBE, BABYSTEPPING))
.tag(4).button( NUDGE_NOZ_POS, GET_TEXT_F(TERN(BABYSTEPPING, MSG_NUDGE_NOZZLE, MSG_ZPROBE_ZOFFSET))
.tag(5).button( SPEED_POS, GET_TEXT_F(MSG_PRINT_SPEED))
.tag(isPrintingFromMediaPaused() ? 7 : 6)
.enabled(
#if ENABLED(SDSUPPORT)
isPrintingFromMedia()
#endif
)
.enabled(TERN0(SDSUPPORT, isPrintingFromMedia()))
.button( PAUSE_POS, isPrintingFromMediaPaused() ? GET_TEXT_F(MSG_RESUME_PRINT) : GET_TEXT_F(MSG_PAUSE_PRINT))
.enabled(
#if ENABLED(SDSUPPORT)
isPrintingFromMedia()
#endif
)
.enabled(TERN0(SDSUPPORT, isPrintingFromMedia()))
.tag(8).button( STOP_POS, GET_TEXT_F(MSG_STOP_PRINT))
.tag(1).colors(action_btn)
.button( BACK_POS, GET_TEXT_F(MSG_BACK));
Expand Down

0 comments on commit d53d9ff

Please sign in to comment.