From: Christoph Sommer Date: Sun, 8 Apr 2007 12:01:42 +0000 (+0000) Subject: Fixed auto-opening of Console when adding lines that get wrapped X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=dfe878ba0e7630f497db2a42acff5c6394a54e0f;p=supertux.git Fixed auto-opening of Console when adding lines that get wrapped SVN-Revision: 4967 --- diff --git a/src/console.cpp b/src/console.cpp index fc5c1cc0f..2a7dbdc82 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -329,8 +329,10 @@ Console::addLine(std::string s) // wrap long lines std::string overflow; + unsigned int line_count = 0; do { lines.push_front(Font::wrap_to_chars(s, 99, &overflow)); + line_count++; s = overflow; } while (s.length() > 0); @@ -342,7 +344,7 @@ Console::addLine(std::string s) if (height < 64) { if(height < 4) height = 4; - height += fontheight; + height += fontheight * line_count; } // reset console to full opacity