Skip to content

Commit 8afdcc8

Browse files
Merge pull request #90 from YonLiud/master
println to handle screen scrolling
2 parents 08ec3a3 + 79e9e16 commit 8afdcc8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Graphics/Graphics.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ class Graphics: public ImageDrawer
190190
{
191191
cursorX = cursorBaseX;
192192
cursorY += font->charHeight;
193+
if(autoScroll && cursorY + font->charHeight > yres)
194+
scroll(cursorY + font->charHeight - yres, backColor);
193195
}
194196
else
195197
print(*str);
@@ -199,7 +201,7 @@ class Graphics: public ImageDrawer
199201

200202
void println(const char *str)
201203
{
202-
print(str);
204+
print(str);
203205
print("\n");
204206
}
205207

0 commit comments

Comments
 (0)