Invert headings on Graphical LCD
This commit is contained in:
parent
3a67fb77b0
commit
85aeb02aa6
|
@ -485,11 +485,13 @@ static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
|
||||||
|
|
||||||
#if ENABLED(LCD_INFO_MENU) || ENABLED(FILAMENT_CHANGE_FEATURE)
|
#if ENABLED(LCD_INFO_MENU) || ENABLED(FILAMENT_CHANGE_FEATURE)
|
||||||
|
|
||||||
static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, const char* valstr=NULL, bool center=true) {
|
static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, bool center=true, bool invert=false, const char* valstr=NULL) {
|
||||||
|
|
||||||
|
lcd_implementation_mark_as_selected(row, invert);
|
||||||
|
|
||||||
char c;
|
char c;
|
||||||
int8_t n = LCD_WIDTH;
|
int8_t n = LCD_WIDTH;
|
||||||
u8g.setPrintPos(0, (row + 1) * (DOG_CHAR_HEIGHT));
|
|
||||||
u8g.setColorIndex(1); // normal text
|
|
||||||
if (center && !valstr) {
|
if (center && !valstr) {
|
||||||
int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
|
int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
|
||||||
while (--pad >= 0) { lcd_print(' '); n--; }
|
while (--pad >= 0) { lcd_print(' '); n--; }
|
||||||
|
|
|
@ -1965,9 +1965,9 @@ void kill_screen(const char* lcd_msg) {
|
||||||
|
|
||||||
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
||||||
START_SCREEN();
|
START_SCREEN();
|
||||||
STATIC_ITEM(MSG_INFO_PRINT_COUNT ": ", itostr3left(stats.totalPrints)); // Print Count : 999
|
STATIC_ITEM(MSG_INFO_PRINT_COUNT ": ", false, false, itostr3left(stats.totalPrints)); // Print Count : 999
|
||||||
STATIC_ITEM(MSG_INFO_FINISHED_PRINTS ": ", itostr3left(stats.finishedPrints)); // Finished : 666
|
STATIC_ITEM(MSG_INFO_FINISHED_PRINTS ": ", false, false, itostr3left(stats.finishedPrints)); // Finished : 666
|
||||||
STATIC_ITEM(MSG_INFO_PRINT_TIME ": ", printTime); // Total Time : 12:34
|
STATIC_ITEM(MSG_INFO_PRINT_TIME ": ", false, false, printTime); // Total Time : 12:34
|
||||||
END_SCREEN();
|
END_SCREEN();
|
||||||
}
|
}
|
||||||
#endif // PRINTCOUNTER
|
#endif // PRINTCOUNTER
|
||||||
|
@ -2032,7 +2032,7 @@ void kill_screen(const char* lcd_msg) {
|
||||||
static void lcd_info_board_menu() {
|
static void lcd_info_board_menu() {
|
||||||
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
||||||
START_SCREEN();
|
START_SCREEN();
|
||||||
STATIC_ITEM(BOARD_NAME); // MyPrinterController
|
STATIC_ITEM(BOARD_NAME, true, true); // MyPrinterController
|
||||||
STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE)); // Baud: 250000
|
STATIC_ITEM(MSG_INFO_BAUDRATE ": " STRINGIFY(BAUDRATE)); // Baud: 250000
|
||||||
STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION); // Protocol: 1.0
|
STATIC_ITEM(MSG_INFO_PROTOCOL ": " PROTOCOL_VERSION); // Protocol: 1.0
|
||||||
#ifdef POWER_SUPPLY
|
#ifdef POWER_SUPPLY
|
||||||
|
@ -2053,7 +2053,7 @@ void kill_screen(const char* lcd_msg) {
|
||||||
static void lcd_info_printer_menu() {
|
static void lcd_info_printer_menu() {
|
||||||
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
if (LCD_CLICKED) lcd_goto_previous_menu(true);
|
||||||
START_SCREEN();
|
START_SCREEN();
|
||||||
STATIC_ITEM(MSG_MARLIN); // Marlin
|
STATIC_ITEM(MSG_MARLIN, true, true); // Marlin
|
||||||
STATIC_ITEM(SHORT_BUILD_VERSION); // x.x.x-Branch
|
STATIC_ITEM(SHORT_BUILD_VERSION); // x.x.x-Branch
|
||||||
STATIC_ITEM(STRING_DISTRIBUTION_DATE); // YYYY-MM-DD HH:MM
|
STATIC_ITEM(STRING_DISTRIBUTION_DATE); // YYYY-MM-DD HH:MM
|
||||||
STATIC_ITEM(MACHINE_NAME); // My3DPrinter
|
STATIC_ITEM(MACHINE_NAME); // My3DPrinter
|
||||||
|
@ -2095,7 +2095,7 @@ void kill_screen(const char* lcd_msg) {
|
||||||
static void lcd_filament_change_option_menu() {
|
static void lcd_filament_change_option_menu() {
|
||||||
START_MENU();
|
START_MENU();
|
||||||
#if LCD_HEIGHT > 2
|
#if LCD_HEIGHT > 2
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_OPTION_HEADER, true, false);
|
||||||
#endif
|
#endif
|
||||||
MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_RESUME, lcd_filament_change_resume_print);
|
MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_RESUME, lcd_filament_change_resume_print);
|
||||||
MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_EXTRUDE, lcd_filament_change_extrude_more);
|
MENU_ITEM(function, MSG_FILAMENT_CHANGE_OPTION_EXTRUDE, lcd_filament_change_extrude_more);
|
||||||
|
@ -2104,7 +2104,7 @@ void kill_screen(const char* lcd_msg) {
|
||||||
|
|
||||||
static void lcd_filament_change_init_message() {
|
static void lcd_filament_change_init_message() {
|
||||||
START_SCREEN();
|
START_SCREEN();
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_1);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_1);
|
||||||
#ifdef MSG_FILAMENT_CHANGE_INIT_2
|
#ifdef MSG_FILAMENT_CHANGE_INIT_2
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_2);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_INIT_2);
|
||||||
|
@ -2117,7 +2117,7 @@ void kill_screen(const char* lcd_msg) {
|
||||||
|
|
||||||
static void lcd_filament_change_unload_message() {
|
static void lcd_filament_change_unload_message() {
|
||||||
START_SCREEN();
|
START_SCREEN();
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_1);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_1);
|
||||||
#ifdef MSG_FILAMENT_CHANGE_UNLOAD_2
|
#ifdef MSG_FILAMENT_CHANGE_UNLOAD_2
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_2);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_UNLOAD_2);
|
||||||
|
@ -2130,7 +2130,7 @@ void kill_screen(const char* lcd_msg) {
|
||||||
|
|
||||||
static void lcd_filament_change_insert_message() {
|
static void lcd_filament_change_insert_message() {
|
||||||
START_SCREEN();
|
START_SCREEN();
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_1);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_1);
|
||||||
#ifdef MSG_FILAMENT_CHANGE_INSERT_2
|
#ifdef MSG_FILAMENT_CHANGE_INSERT_2
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_2);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_INSERT_2);
|
||||||
|
@ -2143,7 +2143,7 @@ void kill_screen(const char* lcd_msg) {
|
||||||
|
|
||||||
static void lcd_filament_change_load_message() {
|
static void lcd_filament_change_load_message() {
|
||||||
START_SCREEN();
|
START_SCREEN();
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_1);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_1);
|
||||||
#ifdef MSG_FILAMENT_CHANGE_LOAD_2
|
#ifdef MSG_FILAMENT_CHANGE_LOAD_2
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_2);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_LOAD_2);
|
||||||
|
@ -2156,7 +2156,7 @@ void kill_screen(const char* lcd_msg) {
|
||||||
|
|
||||||
static void lcd_filament_change_extrude_message() {
|
static void lcd_filament_change_extrude_message() {
|
||||||
START_SCREEN();
|
START_SCREEN();
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_EXTRUDE_1);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_EXTRUDE_1);
|
||||||
#ifdef MSG_FILAMENT_CHANGE_EXTRUDE_2
|
#ifdef MSG_FILAMENT_CHANGE_EXTRUDE_2
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_EXTRUDE_2);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_EXTRUDE_2);
|
||||||
|
@ -2169,7 +2169,7 @@ void kill_screen(const char* lcd_msg) {
|
||||||
|
|
||||||
static void lcd_filament_change_resume_message() {
|
static void lcd_filament_change_resume_message() {
|
||||||
START_SCREEN();
|
START_SCREEN();
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, true, true);
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_RESUME_1);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_RESUME_1);
|
||||||
#ifdef MSG_FILAMENT_CHANGE_RESUME_2
|
#ifdef MSG_FILAMENT_CHANGE_RESUME_2
|
||||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_RESUME_2);
|
STATIC_ITEM(MSG_FILAMENT_CHANGE_RESUME_2);
|
||||||
|
|
|
@ -830,7 +830,8 @@ static void lcd_implementation_status_screen() {
|
||||||
|
|
||||||
#if ENABLED(LCD_INFO_MENU) || ENABLED(FILAMENT_CHANGE_FEATURE)
|
#if ENABLED(LCD_INFO_MENU) || ENABLED(FILAMENT_CHANGE_FEATURE)
|
||||||
|
|
||||||
static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, const char *valstr=NULL, bool center=true) {
|
static void lcd_implementation_drawmenu_static(uint8_t row, const char* pstr, bool center=true, bool invert=false, const char *valstr=NULL) {
|
||||||
|
UNUSED(invert);
|
||||||
char c;
|
char c;
|
||||||
int8_t n = LCD_WIDTH;
|
int8_t n = LCD_WIDTH;
|
||||||
lcd.setCursor(0, row);
|
lcd.setCursor(0, row);
|
||||||
|
|
Loading…
Reference in a new issue