Fix up STATIC_ITEM (#18962)
This commit is contained in:
@ -341,11 +341,11 @@ void MarlinUI::draw_status_screen() {
|
||||
}
|
||||
|
||||
// Draw a static item with no left-right margin required. Centered by default.
|
||||
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
|
||||
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) {
|
||||
menu_item(row);
|
||||
tft_string.set(pstr, itemIndex, itemString);
|
||||
if (valstr)
|
||||
tft_string.add(valstr);
|
||||
if (vstr)
|
||||
tft_string.add(vstr);
|
||||
tft.add_text(tft_string.center(TFT_WIDTH), MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string);
|
||||
}
|
||||
|
||||
|
@ -345,11 +345,11 @@ void MarlinUI::draw_status_screen() {
|
||||
}
|
||||
|
||||
// Draw a static item with no left-right margin required. Centered by default.
|
||||
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
|
||||
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) {
|
||||
menu_item(row);
|
||||
tft_string.set(pstr, itemIndex, itemString);
|
||||
if (valstr)
|
||||
tft_string.add(valstr);
|
||||
if (vstr)
|
||||
tft_string.add(vstr);
|
||||
tft.add_text(tft_string.center(TFT_WIDTH), MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user