[Horus] The SETPOS char (0x1F) is again implemented on Horus (it's needed in the VERSION menu)
This commit is contained in:
@@ -348,6 +348,7 @@ void BitmapBuffer::drawSizedText(coord_t x, coord_t y, const char * s, uint8_t l
|
||||
}
|
||||
}
|
||||
|
||||
bool setpos = false;
|
||||
const coord_t orig_pos = pos;
|
||||
while (len--) {
|
||||
unsigned char c;
|
||||
@@ -355,7 +356,11 @@ void BitmapBuffer::drawSizedText(coord_t x, coord_t y, const char * s, uint8_t l
|
||||
c = idx2char(*s);
|
||||
else
|
||||
c = pgm_read_byte(s);
|
||||
if (!c) {
|
||||
if (setpos) {
|
||||
pos = c;
|
||||
setpos = false;
|
||||
}
|
||||
else if (!c) {
|
||||
break;
|
||||
}
|
||||
else if (c >= 0x20) {
|
||||
@@ -375,6 +380,9 @@ void BitmapBuffer::drawSizedText(coord_t x, coord_t y, const char * s, uint8_t l
|
||||
width = drawCharWithoutCache(x, y, font, fontspecs, getMappedChar(c), flags);
|
||||
INCREMENT_POS(width);
|
||||
}
|
||||
else if (c == 0x1F) { // X-coord prefix
|
||||
setpos = true;
|
||||
}
|
||||
else if (c == 0x1E) {
|
||||
pos = orig_pos;
|
||||
if (flags & VERTICAL)
|
||||
|
||||
Reference in New Issue
Block a user