Use named styles in draw_menu_item_static

This commit is contained in:
Scott Lahteine 2019-09-27 03:06:23 -05:00
parent d683f98019
commit 4c16661153
9 changed files with 84 additions and 77 deletions

View file

@ -965,6 +965,8 @@ void MarlinUI::draw_status_screen() {
#if HAS_LCD_MENU #if HAS_LCD_MENU
#include "../menu/menu.h"
#if ENABLED(ADVANCED_PAUSE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
void MarlinUI::draw_hotend_status(const uint8_t row, const uint8_t extruder) { void MarlinUI::draw_hotend_status(const uint8_t row, const uint8_t extruder) {
@ -976,11 +978,10 @@ void MarlinUI::draw_status_screen() {
#endif // ADVANCED_PAUSE_FEATURE #endif // ADVANCED_PAUSE_FEATURE
void draw_menu_item_static(const uint8_t row, PGM_P pstr, const bool center/*=true*/, const bool invert/*=false*/, const char *valstr/*=nullptr*/) { void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_CENTER*/, const char * const valstr/*=nullptr*/) {
UNUSED(invert);
int8_t n = LCD_WIDTH; int8_t n = LCD_WIDTH;
lcd_moveto(0, row); lcd_moveto(0, row);
if (center && !valstr) { if ((style & SS_CENTER) && !valstr) {
int8_t pad = (LCD_WIDTH - utf8_strlen_P(pstr)) / 2; int8_t pad = (LCD_WIDTH - utf8_strlen_P(pstr)) / 2;
while (--pad >= 0) { lcd_put_wchar(' '); n--; } while (--pad >= 0) { lcd_put_wchar(' '); n--; }
} }

View file

@ -309,6 +309,8 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
#if HAS_LCD_MENU #if HAS_LCD_MENU
#include "../menu/menu.h"
u8g_uint_t row_y1, row_y2; u8g_uint_t row_y1, row_y2;
#if ENABLED(ADVANCED_PAUSE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
@ -361,13 +363,13 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
} }
// Draw a static line of text in the same idiom as a menu item // Draw a static line of text in the same idiom as a menu item
void draw_menu_item_static(const uint8_t row, PGM_P pstr, const bool center/*=true*/, const bool invert/*=false*/, const char* valstr/*=nullptr*/) { void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_CENTER*/, const char * const valstr/*=nullptr*/) {
if (mark_as_selected(row, invert)) { if (mark_as_selected(row, (style & SS_INVERT))) {
u8g_uint_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed u8g_uint_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed
if (center && !valstr) { if ((style & SS_CENTER) && !valstr) {
int8_t pad = (LCD_WIDTH - utf8_strlen_P(pstr)) / 2; int8_t pad = (LCD_WIDTH - utf8_strlen_P(pstr)) / 2;
while (--pad >= 0) { lcd_put_wchar(' '); n--; } while (--pad >= 0) { lcd_put_wchar(' '); n--; }
} }

View file

@ -78,9 +78,13 @@ inline void do_select_screen_yn(selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P
do_select_screen(PSTR(MSG_YES), PSTR(MSG_NO), yesFunc, noFunc, pref, string, suff); do_select_screen(PSTR(MSG_YES), PSTR(MSG_NO), yesFunc, noFunc, pref, string, suff);
} }
#define SS_LEFT 0x00
#define SS_CENTER 0x01
#define SS_INVERT 0x02
void draw_edit_screen(PGM_P const pstr, const char* const value=nullptr); void draw_edit_screen(PGM_P const pstr, const char* const value=nullptr);
void draw_menu_item(const bool sel, const uint8_t row, PGM_P const pstr, const char pre_char, const char post_char); void draw_menu_item(const bool sel, const uint8_t row, PGM_P const pstr, const char pre_char, const char post_char);
void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const bool center=true, const bool invert=false, const char *valstr=nullptr); void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const uint8_t style=SS_CENTER, const char * const valstr=nullptr);
void _draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm); void _draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm);
FORCE_INLINE void draw_menu_item_back(const bool sel, const uint8_t row, PGM_P const pstr) { draw_menu_item(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]); } FORCE_INLINE void draw_menu_item_back(const bool sel, const uint8_t row, PGM_P const pstr) { draw_menu_item(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]); }
FORCE_INLINE void draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data) { _draw_menu_item_edit(sel, row, pstr, data, false); } FORCE_INLINE void draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data) { _draw_menu_item_edit(sel, row, pstr, data, false); }

View file

@ -75,7 +75,7 @@ static void lcd_factory_settings() {
bar_percent += (int8_t)ui.encoderPosition; bar_percent += (int8_t)ui.encoderPosition;
LIMIT(bar_percent, 0, 100); LIMIT(bar_percent, 0, 100);
ui.encoderPosition = 0; ui.encoderPosition = 0;
draw_menu_item_static(0, PSTR(MSG_PROGRESS_BAR_TEST), true, true); draw_menu_item_static(0, PSTR(MSG_PROGRESS_BAR_TEST), SS_CENTER|SS_INVERT);
lcd_put_int((LCD_WIDTH) / 2 - 2, LCD_HEIGHT - 2, bar_percent); lcd_put_wchar('%'); lcd_put_int((LCD_WIDTH) / 2 - 2, LCD_HEIGHT - 2, bar_percent); lcd_put_wchar('%');
lcd_moveto(0, LCD_HEIGHT - 1); ui.draw_progress_bar(bar_percent); lcd_moveto(0, LCD_HEIGHT - 1); ui.draw_progress_bar(bar_percent);
} }

View file

@ -79,7 +79,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
_change_filament_temp_mode = mode; _change_filament_temp_mode = mode;
_change_filament_temp_extruder = extruder; _change_filament_temp_extruder = extruder;
START_MENU(); START_MENU();
if (LCD_HEIGHT >= 4) STATIC_ITEM_P(change_filament_header(mode), true, true); if (LCD_HEIGHT >= 4) STATIC_ITEM_P(change_filament_header(mode), SS_CENTER|SS_INVERT);
MENU_BACK(MSG_BACK); MENU_BACK(MSG_BACK);
MENU_ITEM(function, MSG_PREHEAT_1, _lcd_change_filament_temp_1_func); MENU_ITEM(function, MSG_PREHEAT_1, _lcd_change_filament_temp_1_func);
MENU_ITEM(function, MSG_PREHEAT_2, _lcd_change_filament_temp_2_func); MENU_ITEM(function, MSG_PREHEAT_2, _lcd_change_filament_temp_2_func);
@ -328,7 +328,7 @@ static PGM_P pause_header() {
#define HOTEND_STATUS_ITEM() do { \ #define HOTEND_STATUS_ITEM() do { \
if (_menuLineNr == _thisItemNr) { \ if (_menuLineNr == _thisItemNr) { \
if (ui.should_draw()) { \ if (ui.should_draw()) { \
draw_menu_item_static(_lcdLineNr, PSTR(MSG_FILAMENT_CHANGE_NOZZLE), false, true); \ draw_menu_item_static(_lcdLineNr, PSTR(MSG_FILAMENT_CHANGE_NOZZLE), SS_INVERT); \
ui.draw_hotend_status(_lcdLineNr, hotend_status_extruder); \ ui.draw_hotend_status(_lcdLineNr, hotend_status_extruder); \
} \ } \
if (_skipStatic && encoderLine <= _thisItemNr) { \ if (_skipStatic && encoderLine <= _thisItemNr) { \
@ -351,7 +351,7 @@ void lcd_pause_extrude_more() {
void menu_pause_option() { void menu_pause_option() {
START_MENU(); START_MENU();
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER, true, false); STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER);
#endif #endif
MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_PURGE, lcd_pause_extrude_more); MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_PURGE, lcd_pause_extrude_more);
#if HAS_FILAMENT_SENSOR #if HAS_FILAMENT_SENSOR
@ -369,7 +369,7 @@ void menu_pause_option() {
void _lcd_pause_message(PGM_P const msg1, PGM_P const msg2=nullptr, PGM_P const msg3=nullptr) { void _lcd_pause_message(PGM_P const msg1, PGM_P const msg2=nullptr, PGM_P const msg3=nullptr) {
START_SCREEN(); START_SCREEN();
STATIC_ITEM_P(pause_header(), true, true); STATIC_ITEM_P(pause_header(), SS_CENTER|SS_INVERT);
STATIC_ITEM_P(msg1); STATIC_ITEM_P(msg1);
if (msg2) STATIC_ITEM_P(msg2); if (msg2) STATIC_ITEM_P(msg2);
if (msg3 && (LCD_HEIGHT) >= 5) STATIC_ITEM_P(msg3); if (msg3 && (LCD_HEIGHT) >= 5) STATIC_ITEM_P(msg3);

View file

@ -34,8 +34,8 @@
#include "game/game.h" #include "game/game.h"
#endif #endif
#define STATIC_PAIR(MSG, VALUE, CNTR) do{ strcpy_P(buffer, PSTR(": ")); strcpy(buffer + 2, VALUE); STATIC_ITEM(MSG, CNTR, false, buffer); }while(0) #define STATIC_PAIR(MSG, VALUE, STYL) do{ strcpy_P(buffer, PSTR(": ")); strcpy(buffer + 2, VALUE); STATIC_ITEM(MSG, STYL, buffer); }while(0)
#define STATIC_PAIR_P(MSG, PVALUE, CNTR) do{ strcpy_P(buffer, PSTR(": ")); strcpy_P(buffer + 2, PSTR(PVALUE)); STATIC_ITEM(MSG, CNTR, false, buffer); }while(0) #define STATIC_PAIR_P(MSG, PVALUE, STYL) do{ strcpy_P(buffer, PSTR(": ")); strcpy_P(buffer + 2, PSTR(PVALUE)); STATIC_ITEM(MSG, STYL, buffer); }while(0)
#if ENABLED(PRINTCOUNTER) #if ENABLED(PRINTCOUNTER)
@ -55,33 +55,33 @@
printStatistics stats = print_job_timer.getStats(); printStatistics stats = print_job_timer.getStats();
START_SCREEN(); // 12345678901234567890 START_SCREEN(); // 12345678901234567890
STATIC_PAIR(MSG_INFO_PRINT_COUNT, i16tostr3left(stats.totalPrints), false); // Print Count: 999 STATIC_PAIR(MSG_INFO_PRINT_COUNT, i16tostr3left(stats.totalPrints), SS_LEFT); // Print Count: 999
STATIC_PAIR(MSG_INFO_COMPLETED_PRINTS, i16tostr3left(stats.finishedPrints), false); // Completed : 666 STATIC_PAIR(MSG_INFO_COMPLETED_PRINTS, i16tostr3left(stats.finishedPrints), SS_LEFT); // Completed : 666
STATIC_PAIR_P(MSG_INFO_PRINT_TIME, "", false); // Total print Time: STATIC_PAIR_P(MSG_INFO_PRINT_TIME, "", SS_LEFT); // Total print Time:
STATIC_ITEM("> ", false, false, duration_t(stats.printTime).toString(buffer)); // > 99y 364d 23h 59m 59s STATIC_ITEM("> ", SS_LEFT, duration_t(stats.printTime).toString(buffer)); // > 99y 364d 23h 59m 59s
STATIC_PAIR_P(MSG_INFO_PRINT_LONGEST, "", false); // Longest job time: STATIC_PAIR_P(MSG_INFO_PRINT_LONGEST, "", SS_LEFT); // Longest job time:
STATIC_ITEM("> ", false, false, duration_t(stats.longestPrint).toString(buffer)); // > 99y 364d 23h 59m 59s STATIC_ITEM("> ", SS_LEFT, duration_t(stats.longestPrint).toString(buffer)); // > 99y 364d 23h 59m 59s
STATIC_PAIR_P(MSG_INFO_PRINT_FILAMENT, "", false); // Extruded total: STATIC_PAIR_P(MSG_INFO_PRINT_FILAMENT, "", SS_LEFT); // Extruded total:
sprintf_P(buffer, PSTR("%ld.%im"), long(stats.filamentUsed / 1000), int16_t(stats.filamentUsed / 100) % 10); sprintf_P(buffer, PSTR("%ld.%im"), long(stats.filamentUsed / 1000), int16_t(stats.filamentUsed / 100) % 10);
STATIC_ITEM("> ", false, false, buffer); // > 125m STATIC_ITEM("> ", SS_LEFT, buffer); // > 125m
#if SERVICE_INTERVAL_1 > 0 #if SERVICE_INTERVAL_1 > 0
STATIC_ITEM(SERVICE_NAME_1 MSG_SERVICE_IN, false, false); // Service X in: STATIC_ITEM(SERVICE_NAME_1 MSG_SERVICE_IN, SS_LEFT); // Service X in:
STATIC_ITEM("> ", false, false, duration_t(stats.nextService1).toString(buffer)); // > 7d 12h 11m 10s STATIC_ITEM("> ", SS_LEFT, duration_t(stats.nextService1).toString(buffer)); // > 7d 12h 11m 10s
#endif #endif
#if SERVICE_INTERVAL_2 > 0 #if SERVICE_INTERVAL_2 > 0
STATIC_ITEM(SERVICE_NAME_2 MSG_SERVICE_IN, false, false); STATIC_ITEM(SERVICE_NAME_2 MSG_SERVICE_IN, SS_LEFT);
STATIC_ITEM("> ", false, false, duration_t(stats.nextService2).toString(buffer)); STATIC_ITEM("> ", SS_LEFT, duration_t(stats.nextService2).toString(buffer));
#endif #endif
#if SERVICE_INTERVAL_3 > 0 #if SERVICE_INTERVAL_3 > 0
STATIC_ITEM(SERVICE_NAME_3 MSG_SERVICE_IN, false, false); STATIC_ITEM(SERVICE_NAME_3 MSG_SERVICE_IN, SS_LEFT);
STATIC_ITEM("> ", false, false, duration_t(stats.nextService3).toString(buffer)); STATIC_ITEM("> ", SS_LEFT, duration_t(stats.nextService3).toString(buffer));
#endif #endif
END_SCREEN(); END_SCREEN();
@ -105,63 +105,63 @@ void menu_info_thermistors() {
#if EXTRUDERS #if EXTRUDERS
#define THERMISTOR_ID TEMP_SENSOR_0 #define THERMISTOR_ID TEMP_SENSOR_0
#include "../thermistornames.h" #include "../thermistornames.h"
STATIC_ITEM("T0: " THERMISTOR_NAME, false, true); STATIC_ITEM("T0: " THERMISTOR_NAME, SS_INVERT);
STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_0_MINTEMP), false); STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_0_MINTEMP), SS_LEFT);
STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_0_MAXTEMP), false); STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_0_MAXTEMP), SS_LEFT);
#endif #endif
#if TEMP_SENSOR_1 != 0 #if TEMP_SENSOR_1 != 0
#undef THERMISTOR_ID #undef THERMISTOR_ID
#define THERMISTOR_ID TEMP_SENSOR_1 #define THERMISTOR_ID TEMP_SENSOR_1
#include "../thermistornames.h" #include "../thermistornames.h"
STATIC_ITEM("T1: " THERMISTOR_NAME, false, true); STATIC_ITEM("T1: " THERMISTOR_NAME, SS_INVERT);
STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_1_MINTEMP), false); STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_1_MINTEMP), SS_LEFT);
STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_1_MAXTEMP), false); STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_1_MAXTEMP), SS_LEFT);
#endif #endif
#if TEMP_SENSOR_2 != 0 #if TEMP_SENSOR_2 != 0
#undef THERMISTOR_ID #undef THERMISTOR_ID
#define THERMISTOR_ID TEMP_SENSOR_2 #define THERMISTOR_ID TEMP_SENSOR_2
#include "../thermistornames.h" #include "../thermistornames.h"
STATIC_ITEM("T2: " THERMISTOR_NAME, false, true); STATIC_ITEM("T2: " THERMISTOR_NAME, SS_INVERT);
STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_2_MINTEMP), false); STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_2_MINTEMP), SS_LEFT);
STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_2_MAXTEMP), false); STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_2_MAXTEMP), SS_LEFT);
#endif #endif
#if TEMP_SENSOR_3 != 0 #if TEMP_SENSOR_3 != 0
#undef THERMISTOR_ID #undef THERMISTOR_ID
#define THERMISTOR_ID TEMP_SENSOR_3 #define THERMISTOR_ID TEMP_SENSOR_3
#include "../thermistornames.h" #include "../thermistornames.h"
STATIC_ITEM("T3: " THERMISTOR_NAME, false, true); STATIC_ITEM("T3: " THERMISTOR_NAME, SS_INVERT);
STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_3_MINTEMP), false); STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_3_MINTEMP), SS_LEFT);
STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_3_MAXTEMP), false); STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_3_MAXTEMP), SS_LEFT);
#endif #endif
#if TEMP_SENSOR_4 != 0 #if TEMP_SENSOR_4 != 0
#undef THERMISTOR_ID #undef THERMISTOR_ID
#define THERMISTOR_ID TEMP_SENSOR_4 #define THERMISTOR_ID TEMP_SENSOR_4
#include "../thermistornames.h" #include "../thermistornames.h"
STATIC_ITEM("T4: " THERMISTOR_NAME, false, true); STATIC_ITEM("T4: " THERMISTOR_NAME, SS_INVERT);
STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_4_MINTEMP), false); STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_4_MINTEMP), SS_LEFT);
STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_4_MAXTEMP), false); STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_4_MAXTEMP), SS_LEFT);
#endif #endif
#if TEMP_SENSOR_5 != 0 #if TEMP_SENSOR_5 != 0
#undef THERMISTOR_ID #undef THERMISTOR_ID
#define THERMISTOR_ID TEMP_SENSOR_5 #define THERMISTOR_ID TEMP_SENSOR_5
#include "../thermistornames.h" #include "../thermistornames.h"
STATIC_ITEM("T5: " THERMISTOR_NAME, false, true); STATIC_ITEM("T5: " THERMISTOR_NAME, SS_INVERT);
STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_5_MINTEMP), false); STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_5_MINTEMP), SS_LEFT);
STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_5_MAXTEMP), false); STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_5_MAXTEMP), SS_LEFT);
#endif #endif
#if HAS_HEATED_BED #if HAS_HEATED_BED
#undef THERMISTOR_ID #undef THERMISTOR_ID
#define THERMISTOR_ID TEMP_SENSOR_BED #define THERMISTOR_ID TEMP_SENSOR_BED
#include "../thermistornames.h" #include "../thermistornames.h"
STATIC_ITEM("TBed:" THERMISTOR_NAME, false, true); STATIC_ITEM("TBed:" THERMISTOR_NAME, SS_INVERT);
STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(BED_MINTEMP), false); STATIC_PAIR_P(MSG_INFO_MIN_TEMP, STRINGIFY(BED_MINTEMP), SS_LEFT);
STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(BED_MAXTEMP), false); STATIC_PAIR_P(MSG_INFO_MAX_TEMP, STRINGIFY(BED_MAXTEMP), SS_LEFT);
#endif #endif
END_SCREEN(); END_SCREEN();
} }
@ -179,13 +179,13 @@ void menu_info_board() {
char buffer[21]; // for STATIC_PAIR_P char buffer[21]; // for STATIC_PAIR_P
START_SCREEN(); START_SCREEN();
STATIC_ITEM(BOARD_INFO_NAME, true, true); // MyPrinterController STATIC_ITEM(BOARD_INFO_NAME, SS_CENTER|SS_INVERT); // MyPrinterController
#ifdef BOARD_WEBSITE_URL #ifdef BOARD_WEBSITE_URL
STATIC_ITEM(BOARD_WEBSITE_URL, false, false); // www.my3dprinter.com STATIC_ITEM(BOARD_WEBSITE_URL, SS_LEFT); // www.my3dprinter.com
#endif #endif
STATIC_PAIR_P(MSG_INFO_BAUDRATE, STRINGIFY(BAUDRATE), true); // Baud: 250000 STATIC_PAIR_P(MSG_INFO_BAUDRATE, STRINGIFY(BAUDRATE), SS_CENTER); // Baud: 250000
STATIC_PAIR_P(MSG_INFO_PROTOCOL, PROTOCOL_VERSION, true); // Protocol: 1.0 STATIC_PAIR_P(MSG_INFO_PROTOCOL, PROTOCOL_VERSION, SS_CENTER); // Protocol: 1.0
STATIC_PAIR_P(MSG_INFO_PSU, PSU_NAME, true); STATIC_PAIR_P(MSG_INFO_PSU, PSU_NAME, SS_CENTER);
END_SCREEN(); END_SCREEN();
} }
@ -215,22 +215,22 @@ void menu_info_board() {
#endif #endif
); );
START_SCREEN(); START_SCREEN();
STATIC_ITEM(MSG_MARLIN, true, true); // Marlin STATIC_ITEM(MSG_MARLIN, SS_CENTER|SS_INVERT); // Marlin
STATIC_ITEM(SHORT_BUILD_VERSION, true); // x.x.x-Branch STATIC_ITEM(SHORT_BUILD_VERSION); // x.x.x-Branch
STATIC_ITEM(STRING_DISTRIBUTION_DATE, true); // YYYY-MM-DD HH:MM STATIC_ITEM(STRING_DISTRIBUTION_DATE); // YYYY-MM-DD HH:MM
STATIC_ITEM(MACHINE_NAME, true); // My3DPrinter STATIC_ITEM(MACHINE_NAME); // My3DPrinter
STATIC_ITEM(WEBSITE_URL, true); // www.my3dprinter.com STATIC_ITEM(WEBSITE_URL); // www.my3dprinter.com
STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS), true); // Extruders: 2 STATIC_ITEM(MSG_INFO_EXTRUDERS ": " STRINGIFY(EXTRUDERS)); // Extruders: 2
#if ENABLED(AUTO_BED_LEVELING_3POINT) #if ENABLED(AUTO_BED_LEVELING_3POINT)
STATIC_ITEM(MSG_3POINT_LEVELING, true); // 3-Point Leveling STATIC_ITEM(MSG_3POINT_LEVELING); // 3-Point Leveling
#elif ENABLED(AUTO_BED_LEVELING_LINEAR) #elif ENABLED(AUTO_BED_LEVELING_LINEAR)
STATIC_ITEM(MSG_LINEAR_LEVELING, true); // Linear Leveling STATIC_ITEM(MSG_LINEAR_LEVELING); // Linear Leveling
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR) #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
STATIC_ITEM(MSG_BILINEAR_LEVELING, true); // Bi-linear Leveling STATIC_ITEM(MSG_BILINEAR_LEVELING); // Bi-linear Leveling
#elif ENABLED(AUTO_BED_LEVELING_UBL) #elif ENABLED(AUTO_BED_LEVELING_UBL)
STATIC_ITEM(MSG_UBL_LEVELING, true); // Unified Bed Leveling STATIC_ITEM(MSG_UBL_LEVELING); // Unified Bed Leveling
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)
STATIC_ITEM(MSG_MESH_LEVELING, true); // Mesh Leveling STATIC_ITEM(MSG_MESH_LEVELING); // Mesh Leveling
#endif #endif
END_SCREEN(); END_SCREEN();
} }
@ -252,15 +252,15 @@ void menu_info() {
#endif #endif
)); ));
#else #else
MENU_ITEM(submenu, MSG_INFO_PRINTER_MENU, menu_info_printer); // Printer Info > MENU_ITEM(submenu, MSG_INFO_PRINTER_MENU, menu_info_printer); // Printer Info >
MENU_ITEM(submenu, MSG_INFO_BOARD_MENU, menu_info_board); // Board Info > MENU_ITEM(submenu, MSG_INFO_BOARD_MENU, menu_info_board); // Board Info >
#if EXTRUDERS #if EXTRUDERS
MENU_ITEM(submenu, MSG_INFO_THERMISTOR_MENU, menu_info_thermistors); // Thermistors > MENU_ITEM(submenu, MSG_INFO_THERMISTOR_MENU, menu_info_thermistors); // Thermistors >
#endif #endif
#endif #endif
#if ENABLED(PRINTCOUNTER) #if ENABLED(PRINTCOUNTER)
MENU_ITEM(submenu, MSG_INFO_STATS_MENU, menu_info_stats); // Printer Stats > MENU_ITEM(submenu, MSG_INFO_STATS_MENU, menu_info_stats); // Printer Stats >
#endif #endif
#if HAS_GAMES #if HAS_GAMES

View file

@ -36,7 +36,7 @@
void menu_led_presets() { void menu_led_presets() {
START_MENU(); START_MENU();
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
STATIC_ITEM(MSG_LED_PRESETS, true, true); STATIC_ITEM(MSG_LED_PRESETS, SS_CENTER|SS_INVERT);
#endif #endif
MENU_BACK(MSG_LED_CONTROL); MENU_BACK(MSG_LED_CONTROL);
MENU_ITEM(function, MSG_SET_LEDS_WHITE, leds.set_white); MENU_ITEM(function, MSG_SET_LEDS_WHITE, leds.set_white);

View file

@ -164,7 +164,7 @@ inline void action_mmu2_choose4() { action_mmu2_choose(4); }
void menu_mmu2_choose_filament() { void menu_mmu2_choose_filament() {
START_MENU(); START_MENU();
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
STATIC_ITEM(MSG_MMU2_CHOOSE_FILAMENT_HEADER, true, true); STATIC_ITEM(MSG_MMU2_CHOOSE_FILAMENT_HEADER, SS_CENTER|SS_INVERT);
#endif #endif
MENU_ITEM(function, MSG_MMU2_FILAMENT0, action_mmu2_choose0); MENU_ITEM(function, MSG_MMU2_FILAMENT0, action_mmu2_choose0);
MENU_ITEM(function, MSG_MMU2_FILAMENT1, action_mmu2_choose1); MENU_ITEM(function, MSG_MMU2_FILAMENT1, action_mmu2_choose1);
@ -187,7 +187,7 @@ void menu_mmu2_pause() {
currentTool = mmu2.get_current_tool(); currentTool = mmu2.get_current_tool();
START_MENU(); START_MENU();
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
STATIC_ITEM(MSG_MMU2_FILAMENT_CHANGE_HEADER, true, true); STATIC_ITEM(MSG_MMU2_FILAMENT_CHANGE_HEADER, SS_CENTER|SS_INVERT);
#endif #endif
MENU_ITEM(function, MSG_MMU2_RESUME, action_mmu2_M600_resume); MENU_ITEM(function, MSG_MMU2_RESUME, action_mmu2_M600_resume);
MENU_ITEM(function, MSG_MMU2_UNLOAD_FILAMENT, action_mmu2_M600_unload_filament); MENU_ITEM(function, MSG_MMU2_UNLOAD_FILAMENT, action_mmu2_M600_unload_filament);

View file

@ -262,14 +262,14 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
START_MENU(); START_MENU();
if (LCD_HEIGHT >= 4) { if (LCD_HEIGHT >= 4) {
switch (axis) { switch (axis) {
case X_AXIS: STATIC_ITEM(MSG_MOVE_X, true, true); break; case X_AXIS: STATIC_ITEM(MSG_MOVE_X, SS_CENTER|SS_INVERT); break;
case Y_AXIS: STATIC_ITEM(MSG_MOVE_Y, true, true); break; case Y_AXIS: STATIC_ITEM(MSG_MOVE_Y, SS_CENTER|SS_INVERT); break;
case Z_AXIS: STATIC_ITEM(MSG_MOVE_Z, true, true); break; case Z_AXIS: STATIC_ITEM(MSG_MOVE_Z, SS_CENTER|SS_INVERT); break;
default: default:
#if ENABLED(MANUAL_E_MOVES_RELATIVE) #if ENABLED(MANUAL_E_MOVES_RELATIVE)
manual_move_e_origin = current_position[E_AXIS]; manual_move_e_origin = current_position[E_AXIS];
#endif #endif
STATIC_ITEM(MSG_MOVE_E, true, true); STATIC_ITEM(MSG_MOVE_E, SS_CENTER|SS_INVERT);
break; break;
} }
} }