Index: trunk/src/lib/graphics/text_engine/multi_line_text.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/multi_line_text.cc	(revision 7737)
+++ trunk/src/lib/graphics/text_engine/multi_line_text.cc	(revision 7738)
@@ -98,5 +98,5 @@
       ++lineNumber;
       posX = 0.0f;
-      posY += this->lineSpacing + this->getFont()->getMaxHeight();
+      posY += this->lineSpacing + this->getSize(); //this->getFont()->getMaxHeight();
     }
 
Index: trunk/src/lib/shell/shell.cc
===================================================================
--- trunk/src/lib/shell/shell.cc	(revision 7737)
+++ trunk/src/lib/shell/shell.cc	(revision 7738)
@@ -51,5 +51,5 @@
   ->describe("Sets the font of the Shell")
   ->defaultValues(SHELL_DEFAULT_FONT)
-      ->completionPlugin(0, OrxShell::CompletorFileSystem(".ttf", "fonts/"));
+  ->completionPlugin(0, OrxShell::CompletorFileSystem(".ttf", "fonts/"));
 
   /**
@@ -74,6 +74,4 @@
     this->setLayer(E2D_LAYER_ABOVE_ALL);
     this->shellInput.setLayer(E2D_LAYER_ABOVE_ALL);
-
-    this->backgroundMaterial = new Material;
 
     // Element2D and generals
@@ -108,7 +106,4 @@
       this->bufferText.pop_front();
     }
-
-    // delete the inputLine
-    delete this->backgroundMaterial;
   }
 
@@ -172,10 +167,7 @@
   void Shell::setFont(const std::string& fontFile)
   {
-    //   if (!ResourceManager::isInDataDir(fontFile))
-    //     return false;
-
     this->fontFile = fontFile;
 
-    this->resetValues();
+    this->applySettings();
   }
 
@@ -193,5 +185,5 @@
     this->lineSpacing = lineSpacing;
 
-    this->resetValues();
+    this->applySettings();
   }
 
@@ -210,7 +202,6 @@
     this->textColor[3] = a;
 
-    this->resetValues();
-  }
-
+    this->applySettings();
+  }
 
   /**
@@ -223,6 +214,6 @@
   void Shell::setBackgroundColor(float r, float g, float b, float a)
   {
-    this->backgroundMaterial->setDiffuse(r, g, b);
-    this->backgroundMaterial->setTransparency(a);
+    this->backgroundMaterial.setDiffuse(r, g, b);
+    this->backgroundMaterial.setTransparency(a);
   }
 
@@ -233,34 +224,30 @@
   void Shell::setBackgroundImage(const std::string& fileName)
   {
-    this->backgroundMaterial->setDiffuseMap(fileName);
-  }
-
-
-  /**
-   * @brief resets the Values of all visible shell's commandos to the Shell's stored values
-   *
-   * this functions synchronizes the stored Data with the visible one.
-   */
-  void Shell::resetValues()
-  {
-    this->resetText(&this->shellInput, 0);
-    this->shellInput.setRelCoor2D(15, (this->textSize + this->lineSpacing)*(this->bufferDisplaySize));
-
-    unsigned int i = 0;
-    /* Here we create a Copy of the Buffer, so that we do not f**k up the List when some
-     * output is routed from Some other Thread or by Changing any Values.
-     */
-    std::list<MultiLineText*> bufferTextCopy = this->bufferText;
-    for (std::list<MultiLineText*>::iterator text = bufferTextCopy.begin(); text != bufferTextCopy.end(); ++text, ++i)
-    {
-      this->resetText(*text, i);
-      (*text)->setRelCoor2D( calculateLinePosition(i) );
-    }
-    this->shellHeight = (this->textSize + this->lineSpacing) * (bufferDisplaySize+1);
-  }
-
-  void Shell::resetText(Text* text, unsigned int position)
+    this->backgroundMaterial.setDiffuseMap(fileName);
+  }
+
+  /**
+   * @brief repositiones all the Texts to their position.
+   */
+  void Shell::repositionText()
+  {
+    int linePos = -1;
+    std::list<MultiLineText*>::iterator textIt;
+    for (textIt = this->bufferText.begin() ; textIt != this->bufferText.end(); ++textIt )
+    {
+      linePos += (*textIt)->getLineCount();
+      (*textIt)->setRelCoorSoft2D(this->calculateLinePosition(linePos), 8);
+    }
+  }
+
+
+  /**
+   * @brief applies the Shells Settings to a single Text of the Shell.
+   * @param text the Text to apply the settings to.
+   */
+  void Shell::applyTextSettings(Text* text)
   {
     text->setFont(this->fontFile, this->textSize);
+    text->setSize(this->textSize);
     text->setColor(this->textColor[0], this->textColor[1], this->textColor[2]);
     text->setBlending(this->textColor[3]);
@@ -270,4 +257,28 @@
   }
 
+  /**
+   * @brief resets the Values of all visible shell's commandos to the Shell's stored values
+   *
+   * this functions synchronizes the stored Data with the visible one.
+   */
+  void Shell::applySettings()
+  {
+    this->applyTextSettings(&this->shellInput);
+    this->shellInput.setRelCoor2D(15, (this->textSize + this->lineSpacing)*(this->bufferDisplaySize));
+
+    /* Here we create a Copy of the Buffer, so that we do not f**k up the List when some
+     * output is routed from Some other Thread or by Changing any Values.
+     */
+    std::list<MultiLineText*> bufferTextCopy = this->bufferText;
+    for (std::list<MultiLineText*>::iterator textIt = bufferTextCopy.begin(); textIt != bufferTextCopy.end(); ++textIt)
+    {
+      this->applyTextSettings(*textIt);
+      (*textIt)->setLineSpacing(this->lineSpacing);
+      (*textIt)->setLineWidth(this->getSizeX2D() * GraphicsEngine::getInstance()->getResolutionX());
+    }
+    this->repositionText();
+
+    this->shellHeight = (this->textSize + this->lineSpacing) * (bufferDisplaySize+1);
+  }
 
   /**
@@ -291,10 +302,8 @@
       {
         this->bufferText.push_back(new MultiLineText);
-        this->bufferText.back()->setLineWidth(this->getSizeX2D() * GraphicsEngine::getInstance()->getResolutionX());
-        this->bufferText.back()->setLineSpacing(0);
       }
     }
     this->bufferDisplaySize = bufferDisplaySize;
-    this->resetValues();
+    this->applySettings();
   }
 
@@ -304,7 +313,7 @@
   void Shell::flush()
   {
-    for (std::list<MultiLineText*>::iterator text = this->bufferText.begin(); text != this->bufferText.end(); ++text)
-    {
-      (*text)->setText("");  // remove all chars from the BufferTexts.
+    for (std::list<MultiLineText*>::iterator textIt = this->bufferText.begin(); textIt != this->bufferText.end(); ++textIt)
+    {
+      (*textIt)->setText("");  // remove all chars from the BufferTexts.
     }
     ShellBuffer::getInstance()->flush();
@@ -326,30 +335,15 @@
 
     // The LineCount will be started here.
-    int linePos = -1;
 
     // The First Line gets a special Animation
-    this->bufferText.front()->setRelCoor2D(this->calculateLinePosition(linePos)- Vector2D(-1000,0));
+    this->bufferText.front()->setRelCoor2D(this->calculateLinePosition(0)- Vector2D(-1000,0));
 
     // Move all lines one Entry up.
-    for (std::list<MultiLineText*>::iterator textIt = this->bufferText.begin(); textIt != this->bufferText.end(); ++textIt)
-    {
-      linePos += (*textIt)->getLineCount();
-      (*textIt)->setRelCoorSoft2D(this->calculateLinePosition(linePos), 8);
-    }
-
-
-    /*  FANCY EFFECTS :)
-      1:
-          lastText->setRelCoor2D(this->calculateLinePosition(0)- Vector(-1000,0,0));
-          lastText->setRelCoorSoft2D(this->calculateLinePosition(0),10);
-      2:
-      lastText->setRelDir2D(-90);
-      lastText->setRelDirSoft2D(0, 20);
-    */
-
-  }
-
-  /**
-   * moves the Display buffer (up + or down - )
+    this->repositionText();
+  }
+
+
+  /**
+   * @brief moves the Display buffer (up + or down - )
    * @param lineCount the count by which to shift the InputBuffer.
    *
@@ -409,5 +403,5 @@
 
   /**
-   * clears the Shell (empties all buffers)
+   * @brief clears the Shell (empties all buffers)
    */
   void Shell::clear()
@@ -418,5 +412,5 @@
 
   /**
-   * listens for some event
+   * @brief listens for some event
    * @param event the Event happened
    */
@@ -451,5 +445,5 @@
     // setting the Blending effects
 
-    this->backgroundMaterial->select();
+    this->backgroundMaterial.select();
 
     glBegin(GL_TRIANGLE_STRIP);
@@ -481,7 +475,5 @@
   Vector2D Shell::calculateLinePosition(unsigned int lineNumber)
   {
-    Vector2D val(5, (int)(this->textSize + this->lineSpacing)*(int)((int)this->bufferDisplaySize - (int)lineNumber - (int)2) + (int)this->textSize);
-     val.debug();
-     return val;
+    return Vector2D(5, (int)(this->textSize + this->lineSpacing)*(int)((int)this->bufferDisplaySize - (int)lineNumber - (int)2) + (int)this->textSize);
   }
 
Index: trunk/src/lib/shell/shell.h
===================================================================
--- trunk/src/lib/shell/shell.h	(revision 7737)
+++ trunk/src/lib/shell/shell.h	(revision 7738)
@@ -14,4 +14,5 @@
 
 #include "shell_input.h"
+#include "material.h"
 
 #define         SHELL_DEFAULT_FONT              "fonts/final_frontier.ttf"
@@ -79,6 +80,7 @@
 
   private:
-    void resetValues();
-    void resetText(Text* text, unsigned int position);
+    void repositionText();
+    void applyTextSettings(Text* text);
+    void applySettings();
     // helpers //
     Vector2D calculateLinePosition(unsigned int lineNumber);
@@ -98,5 +100,5 @@
     float                       textColor[4];           //!< The text's color [r,g,b,a].
     std::string                 fontFile;               //!< The file containing the font.
-    Material*                   backgroundMaterial;     //!< A material for the background.
+    Material                    backgroundMaterial;     //!< A material for the background.
 
     // HANDLING TEXT INPUT
