Skip to content

Commit

Permalink
Switch col vs row variable name (MarlinFirmware#15072)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbycandra authored and thinkyhead committed Aug 28, 2019
1 parent 604bdf0 commit ca084dc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Marlin/src/lcd/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,17 +266,17 @@ millis_t next_button_update_ms;

void MarlinUI::draw_select_screen_prompt(PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) {
const uint8_t plen = utf8_strlen_P(pref), slen = suff ? utf8_strlen_P(suff) : 0;
uint8_t row = 0, col = 0;
uint8_t col = 0, row = 0;
if (!string && plen + slen <= LCD_WIDTH) {
row = (LCD_WIDTH - plen - slen) / 2;
col = LCD_HEIGHT > 3 ? 1 : 0;
col = (LCD_WIDTH - plen - slen) / 2;
row = LCD_HEIGHT > 3 ? 1 : 0;
}
wrap_string_P(row, col, pref, true);
wrap_string_P(col, row, pref, true);
if (string) {
if (row) { row = 0; col++; } // Move to the start of the next line
wrap_string(row, col, string);
if (col) { col = 0; row++; } // Move to the start of the next line
wrap_string(col, row, string);
}
if (suff) wrap_string_P(row, col, suff);
if (suff) wrap_string_P(col, row, suff);
}

#endif // HAS_LCD_MENU
Expand Down

0 comments on commit ca084dc

Please sign in to comment.