tidy up bottom and edges of console

ugfx_release_2.6
trsaunders 2012-07-22 22:23:53 +01:00
parent 4a11dfd0b8
commit c1a8f5ea2b
1 changed files with 5 additions and 0 deletions

View File

@ -100,6 +100,8 @@ msg_t lcdConsoleInit(GLCDConsole *console, uint16_t x0, uint16_t y0, uint16_t wi
console->color = color;
console->font = font;
lcdDrawRect(x0, y0, width, height,1, console->bkcolor);
}
msg_t lcdConsolePut(GLCDConsole *console, char c) {
@ -118,6 +120,9 @@ msg_t lcdConsolePut(GLCDConsole *console, char c) {
} else {
width = lcdMeasureChar(c, console->font);
if((console->cx + width) >= console->sx) {
/* clear the text at the end of the line */
lcdDrawRect(console->cx, console->cy, console->cx + width, console->cy + console->fy,
1, console->bkcolor);
console->cx = 0;
console->cy += console->fy;
}