[Orxonox-commit 1423] r6141 - code/branches/presentation2/src/libraries/core

rgrieder at orxonox.net rgrieder at orxonox.net
Wed Nov 25 07:26:11 CET 2009


Author: rgrieder
Date: 2009-11-25 07:26:10 +0100 (Wed, 25 Nov 2009)
New Revision: 6141

Modified:
   code/branches/presentation2/src/libraries/core/IOConsole.cc
Log:
Better colour scheme for the IOConsole on Windows.

Modified: code/branches/presentation2/src/libraries/core/IOConsole.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/IOConsole.cc	2009-11-24 23:09:02 UTC (rev 6140)
+++ code/branches/presentation2/src/libraries/core/IOConsole.cc	2009-11-25 06:26:10 UTC (rev 6141)
@@ -577,8 +577,8 @@
         {
         case  1: SetConsoleTextAttribute(stdOutHandle_, FOREGROUND_RED | FOREGROUND_INTENSITY); break;
         case  2: SetConsoleTextAttribute(stdOutHandle_, FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY); break;
-        case  3: SetConsoleTextAttribute(stdOutHandle_, FOREGROUND_BLUE | FOREGROUND_INTENSITY); break;
-        case  4: SetConsoleTextAttribute(stdOutHandle_, FOREGROUND_GREEN); break;
+        case  3: SetConsoleTextAttribute(stdOutHandle_, FOREGROUND_INTENSITY); break;
+        case  4: SetConsoleTextAttribute(stdOutHandle_, FOREGROUND_INTENSITY); break;
         default: break;
         }
 
@@ -591,17 +591,20 @@
 
     void IOConsole::printInputLine()
     {
+        SetConsoleTextAttribute(stdOutHandle_, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
         this->moveCursorYAndHome(0);
         this->clearCurrentLine();
         this->cout_ << this->promptString_ << this->shell_->getInput();
         this->moveCursorYAndHome(0);
         this->moveCursor(this->promptString_.size() + this->buffer_->getCursorPosition(), 0);
+        SetConsoleTextAttribute(stdOutHandle_, FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN);
     }
 
     void IOConsole::printStatusLines()
     {
         if (this->willPrintStatusLines())
         {
+            SetConsoleTextAttribute(stdOutHandle_, FOREGROUND_GREEN);
             this->bStatusPrinted_ = true;
             // Put cursor on home position, one line down the input line
             this->moveCursorYAndHome(1);
@@ -614,6 +617,7 @@
             // Restore cursor position
             this->moveCursorYAndHome(-1);
             this->moveCursor(this->promptString_.size() + this->buffer_->getCursorPosition(), 0);
+            SetConsoleTextAttribute(stdOutHandle_, FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN);
         }
         else
             this->bStatusPrinted_ = false;




More information about the Orxonox-commit mailing list