FIX: dynamic width detection
This commit is contained in:
parent
8e5a4e2501
commit
56dda350b4
@ -159,7 +159,7 @@ public:
|
|||||||
void print(int x, int y, const RGBA color, const char *message) {
|
void print(int x, int y, const RGBA color, const char *message) {
|
||||||
while (*message != '\0') {
|
while (*message != '\0') {
|
||||||
print(&x, &y, color, &message);
|
print(&x, &y, color, &message);
|
||||||
x += 2; // space between characters
|
x += 1; // space between characters
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ public:
|
|||||||
const auto pixelY = *y0 + y;
|
const auto pixelY = *y0 + y;
|
||||||
if (active) {
|
if (active) {
|
||||||
setPixel(pixelX, pixelY, color);
|
setPixel(pixelX, pixelY, color);
|
||||||
maxWidth = max(x, maxWidth);
|
maxWidth = max(x + 1, maxWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user