lcd_put_wchar_max for COLOR_UI (#20838)

Co-Authored-By: Victor Oliveira <github@victormo.com.br>
This commit is contained in:
Tanguy Pruvot
2021-01-23 06:23:35 +01:00
committed by GitHub
parent 14567f3459
commit 0f612d5021
2 changed files with 19 additions and 4 deletions

View File

@ -668,6 +668,13 @@ void lcd_moveto(const lcd_uint_t col, const lcd_uint_t row) {
tft.set_background(COLOR_BACKGROUND);
}
int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) {
tft_string.set();
tft_string.add(c);
tft.add_text(MENU_TEXT_X_OFFSET, MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string);
return tft_string.width();
}
int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
tft_string.set(utf8_str_P);
tft_string.trim();