Index: code/branches/console/src/orxonox/overlays/InGameConsole.cc
===================================================================
--- code/branches/console/src/orxonox/overlays/InGameConsole.cc	(revision 5945)
+++ code/branches/console/src/orxonox/overlays/InGameConsole.cc	(revision 5969)
@@ -68,5 +68,6 @@
     */
     InGameConsole::InGameConsole()
-        : consoleOverlay_(0)
+        : shell_(Shell::getInstance())
+        , consoleOverlay_(0)
         , consoleOverlayContainer_(0)
         , consoleOverlayNoise_(0)
@@ -174,5 +175,5 @@
         // create the corresponding input state
         inputState_ = InputManager::getInstance().createInputState("console", false, false, InputStatePriority::Console);
-        inputState_->setKeyHandler(Shell::getInstance().getInputBuffer());
+        inputState_->setKeyHandler(this->shell_.getInputBuffer());
         bHidesAllInputChanged();
 
@@ -252,5 +253,5 @@
         this->consoleOverlayContainer_->setTop(-1.2 * this->relativeHeight);
 
-        Shell::getInstance().addOutputLevel(true);
+        this->shell_.addOutputLevel(true);
 
         COUT(4) << "Info: InGameConsole initialized" << std::endl;
@@ -266,9 +267,9 @@
     void InGameConsole::linesChanged()
     {
-        std::list<std::string>::const_iterator it = Shell::getInstance().getNewestLineIterator();
+        std::list<std::string>::const_iterator it = this->shell_.getNewestLineIterator();
         int max = 0;
         for (int i = 1; i < LINES; ++i)
         {
-            if (it != Shell::getInstance().getEndIterator())
+            if (it != this->shell_.getEndIterator())
             {
                 ++it;
@@ -295,5 +296,5 @@
     {
         if (LINES > 1)
-            this->print(*Shell::getInstance().getNewestLineIterator(), 1);
+            this->print(*this->shell_.getNewestLineIterator(), 1);
     }
 
@@ -314,7 +315,7 @@
     {
         if (LINES > 0)
-            this->print(Shell::getInstance().getInput(), 0);
-
-        if (Shell::getInstance().getInput() == "" || Shell::getInstance().getInput().size() == 0)
+            this->print(this->shell_.getInput(), 0);
+
+        if (this->shell_.getInput() == "" || this->shell_.getInput().size() == 0)
             this->inputWindowStart_ = 0;
     }
@@ -325,5 +326,5 @@
     void InGameConsole::cursorChanged()
     {
-        unsigned int pos = Shell::getInstance().getCursorPosition() - inputWindowStart_;
+        unsigned int pos = this->shell_.getCursorPosition() - inputWindowStart_;
         if (pos > maxCharsPerLine_)
             pos = maxCharsPerLine_;
@@ -482,8 +483,8 @@
                 if (output.size() > this->maxCharsPerLine_)
                 {
-                    if (Shell::getInstance().getInputBuffer()->getCursorPosition() < this->inputWindowStart_)
-                        this->inputWindowStart_ = Shell::getInstance().getInputBuffer()->getCursorPosition();
-                    else if (Shell::getInstance().getInputBuffer()->getCursorPosition() >= (this->inputWindowStart_ + this->maxCharsPerLine_ - 1))
-                        this->inputWindowStart_ = Shell::getInstance().getInputBuffer()->getCursorPosition() - this->maxCharsPerLine_ + 1;
+                    if (this->shell_.getInputBuffer()->getCursorPosition() < this->inputWindowStart_)
+                        this->inputWindowStart_ = this->shell_.getInputBuffer()->getCursorPosition();
+                    else if (this->shell_.getInputBuffer()->getCursorPosition() >= (this->inputWindowStart_ + this->maxCharsPerLine_ - 1))
+                        this->inputWindowStart_ = this->shell_.getInputBuffer()->getCursorPosition() - this->maxCharsPerLine_ + 1;
 
                     output = output.substr(this->inputWindowStart_, this->maxCharsPerLine_);
@@ -506,5 +507,5 @@
             this->bActive_ = true;
             InputManager::getInstance().enterState("console");
-            Shell::getInstance().registerListener(this);
+            this->shell_.registerListener(this);
 
             this->windowResized(this->windowW_, this->windowH_);
@@ -528,5 +529,5 @@
             this->bActive_ = false;
             InputManager::getInstance().leaveState("console");
-            Shell::getInstance().unregisterListener(this);
+            this->shell_.unregisterListener(this);
 
             // scroll up
