START_ROW => START_COL

This commit is contained in:
Scott Lahteine 2016-07-09 12:06:47 -07:00
parent d2099fef0d
commit d9f75f62c0

View File

@ -135,7 +135,7 @@
#define TALL_FONT_CORRECTION 0
#endif
#define START_ROW 0
#define START_COL 0
// LCD selection
#if ENABLED(U8GLIB_ST7920)
@ -480,7 +480,7 @@ static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
else {
u8g.setColorIndex(1); // unmarked text is black on white
}
u8g.setPrintPos((START_ROW) * (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT));
u8g.setPrintPos((START_COL) * (DOG_CHAR_WIDTH), (row + 1) * (DOG_CHAR_HEIGHT));
}
#if ENABLED(LCD_INFO_MENU) || ENABLED(FILAMENT_CHANGE_FEATURE)
@ -490,7 +490,7 @@ static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
lcd_implementation_mark_as_selected(row, invert);
char c;
int8_t n = LCD_WIDTH;
int8_t n = LCD_WIDTH - (START_COL);
if (center && !valstr) {
int8_t pad = (LCD_WIDTH - lcd_strlen_P(pstr)) / 2;
@ -513,7 +513,7 @@ static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, co
UNUSED(pre_char);
char c;
uint8_t n = LCD_WIDTH - 2;
uint8_t n = LCD_WIDTH - (START_COL) - 2;
lcd_implementation_mark_as_selected(row, isSelected);
@ -530,7 +530,7 @@ static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, co
static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) {
char c;
uint8_t vallen = (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data)));
uint8_t n = LCD_WIDTH - 2 - vallen;
uint8_t n = LCD_WIDTH - (START_COL) - 2 - vallen;
lcd_implementation_mark_as_selected(row, isSelected);
@ -570,7 +570,7 @@ static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const c
void lcd_implementation_drawedit(const char* pstr, const char* value=NULL) {
uint8_t rows = 1;
uint8_t lcd_width = LCD_WIDTH, char_width = DOG_CHAR_WIDTH;
uint8_t lcd_width = LCD_WIDTH - (START_COL), char_width = DOG_CHAR_WIDTH;
uint8_t vallen = lcd_strlen(value);
#if ENABLED(USE_BIG_EDIT_FONT)
@ -604,7 +604,7 @@ void lcd_implementation_drawedit(const char* pstr, const char* value=NULL) {
static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char* const longFilename, bool isDir) {
UNUSED(pstr);
char c;
uint8_t n = LCD_WIDTH - 1;
uint8_t n = LCD_WIDTH - (START_COL) - 1;
if (longFilename[0]) {
filename = longFilename;