first light 👍😅

* idea seems to work
* scrolling is broken, probably I need to create a unicode-aware ``strlen``
This commit is contained in:
Frank
2025-11-20 13:57:55 +01:00
parent 0a593b4d39
commit 45f793b338
3 changed files with 52 additions and 23 deletions

View File

@@ -827,7 +827,7 @@ typedef struct Segment {
void drawCharacter(unsigned char chr, int16_t x, int16_t y, uint8_t w, uint8_t h, uint32_t color, uint32_t col2 = 0, bool drawShadow = false);
inline void drawCharacter(unsigned char chr, int16_t x, int16_t y, uint8_t w, uint8_t h, CRGB c, CRGB c2) { drawCharacter(chr, x, y, w, h, uint32_t(c) & 0x00FFFFFF, uint32_t(c2) & 0x00FFFFFF); } // automatic inline
// unicode-aware wrapper for drawCharacter(), to be called from mode_2Dscrollingtext()
void drawText(const unsigned char* text, size_t maxLen, int16_t x, int16_t y, uint8_t w, uint8_t h, uint32_t color, uint32_t col2 = 0, bool drawShadow = false);
void drawText(const unsigned char* text, size_t maxLen, int maxLetters, int16_t x, int16_t y, uint8_t w, uint8_t h, uint32_t color, uint32_t col2 = 0, bool drawShadow = false);
// #if !WLED_ENABLE_FULL_FONTS => drawText() will fall back to just forwarding each char to drawCharacter()
void wu_pixel(uint32_t x, uint32_t y, CRGB c);