Add end marker to text window and increase max rows.
This commit is contained in:
parent
953c472897
commit
5945d556a6
@ -338,11 +338,22 @@ void TextWindow::ClearScreen() {
|
||||
rows = 0;
|
||||
}
|
||||
|
||||
// This message was addded when someone had too many fonts for the text window
|
||||
// Scrolling seemed to be broken, but was actaully at the MAX_ROWS.
|
||||
static const char* endString = " **** End of Text Screen ****";
|
||||
|
||||
void TextWindow::Printf(bool halfLine, const char *fmt, ...) {
|
||||
if(!canvas) return;
|
||||
|
||||
if(rows >= MAX_ROWS) return;
|
||||
|
||||
if(rows >= MAX_ROWS-2 && (fmt != endString)) {
|
||||
// twice due to some half-row issues on resizing
|
||||
Printf(halfLine, endString);
|
||||
Printf(halfLine, endString);
|
||||
return;
|
||||
}
|
||||
|
||||
va_list vl;
|
||||
va_start(vl, fmt);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user