Index: trunk/src/util/shell.cc
===================================================================
--- trunk/src/util/shell.cc	(revision 5079)
+++ trunk/src/util/shell.cc	(revision 5080)
@@ -35,14 +35,15 @@
   this->setName("Shell");
 
-  this->bufferText = new tList<Text>;
   this->buffer = new tList<char>;
 
+  this->textSize = 10;
+
   //this->bufferSize = 0;
-  //this->bufferDisplaySize = 0;
+  this->bufferText = NULL;
   this->setBufferSize(100);
-  this->setBufferDisplaySize(1);
-
-//  this->inputLineText = TextEngine::getInstance()->createText("fonts/earth.ttf", 10, TEXT_DYNAMIC, 0, 255, 0);
-//  this->inputLineText->setText(NULL);
+  this->setBufferDisplaySize(10);
+
+  this->inputLineText = TextEngine::getInstance()->createText("fonts/earth.ttf", 10, TEXT_DYNAMIC, 255, 0, 0);
+  this->inputLineText->setText(NULL);
 
   //this->addBufferLineStatic("asjflksjdvklasmv %s", "doom");
@@ -59,15 +60,8 @@
 {
   // delete what has to be deleted here
-  tIterator<Text>* textIterator = this->bufferText->getIterator();
-  Text* textElem = textIterator->nextElement();
-
-  while (textElem != NULL)
-  {
-    delete textElem;
-
-    textElem = textIterator->nextElement();
-  }
-  delete textIterator;
+  for (int i = 0; i < this->bufferDisplaySize; i++)
+    delete this->bufferText[i];
   delete this->bufferText;
+  delete this->inputLineText;
 
   Shell::singletonRef = NULL;
@@ -80,19 +74,22 @@
 void Shell::setBufferDisplaySize(unsigned int bufferDisplaySize)
 {
+  if (this->bufferText != NULL)
+  {
+    for (unsigned int i = 0; i < this->bufferDisplaySize; i++)
+      delete this->bufferText[i];
+    delete this->bufferText;
+  }
+
+  this->bufferText = new Text*[bufferDisplaySize];
+  for (unsigned int i = 0; i < bufferDisplaySize; i++)
+  {
+    this->bufferText[i] = TextEngine::getInstance()->createText("fonts/earth.ttf", this->textSize, TEXT_DYNAMIC, 255, 0, 0);
+    this->bufferText[i]->setAlignment(TEXT_ALIGN_LEFT);
+    this->bufferText[i]->setPosition2D(5, 400 + 12*i);
+    this->bufferText[i]->setText(NULL);
+  }
+
+
   this->bufferDisplaySize = bufferDisplaySize;
-
-  while (bufferDisplaySize < this->bufferText->getSize())
-  {
-    delete this->bufferText->lastElement();
-    this->bufferText->removeLast();
-  }
-  while(bufferDisplaySize > this->bufferText->getSize())
-  {
-    Text* newText = TextEngine::getInstance()->createText("fonts/earth.ttf", 10, TEXT_DYNAMIC, 0, 255, 0);
-    newText->setAlignment(TEXT_ALIGN_LEFT);
-    newText->setPosition2D(5, 500);
-    newText->setText("");
-    this->bufferText->add(newText);
-  }
 }
 
@@ -103,14 +100,9 @@
 {
   // remove all chars from the BufferTexts.
-  tIterator<Text>* textIterator = this->bufferText->getIterator();
-  Text* textElem = textIterator->nextElement();
-
-  while (textElem != NULL)
-  {
-    textElem->setText(NULL);
-
-    textElem = textIterator->nextElement();
-  }
-  delete textIterator;
+  if (this->bufferText)
+    for (int i; i < this->bufferDisplaySize; i++)
+    {
+      this->bufferText[i]->setText(NULL);
+    }
 
 
@@ -146,5 +138,14 @@
   return true;
 }
-
+int curr = 0;
+
+/**
+ * add a Line to the List of Buffers
+ * @param line
+ * @param arguments
+ *
+ * This function Adds one line to the buffer.
+ * and displays the line as the First Line of the display-buffer
+ */
 void Shell::addBufferLine(const char* line, va_list arguments)
 {
@@ -154,14 +155,25 @@
    strcpy(newLine, this->bufferArray);
 
-//   this->buffer->add(newLine);
-//
-//   if (this->buffer->getSize() > this->bufferSize)
-//   {
-//     delete this->buffer->firstElement();
-//     this->buffer->remove(this->buffer->firstElement());
-//   }
-
-  this->bufferText->firstElement()->setText(newLine);
-//  this->inputLineText->setText(line);
+   this->buffer->add(newLine);
+
+   if (this->buffer->getSize() > this->bufferSize)
+   {
+     delete this->buffer->firstElement();
+     this->buffer->remove(this->buffer->firstElement());
+   }
+
+   if (likely(bufferText != NULL))
+   {
+     Text* moveText = this->bufferText[this->bufferDisplaySize-1];
+     for (int i = this->bufferDisplaySize-1; i > 0; i--)
+     {
+       this->bufferText[i] = this->bufferText[i-1];
+     // this->bufferText[i]
+     }
+     this->bufferText[0] = moveText;
+   }
+   this->bufferText[0]->setText(newLine);
+   // this->bufferText->
+//  this->inputLineText->setText(newLine);
 }
 
Index: trunk/src/util/shell.h
===================================================================
--- trunk/src/util/shell.h	(revision 5079)
+++ trunk/src/util/shell.h	(revision 5080)
@@ -78,9 +78,10 @@
     tList<char>*           buffer;                 //!< A list of stored char-arrays(strings) to store the history
 
-    tList<Text>*           bufferText;             //!< A list of stored bufferTexts for the display of the buffer
+    Text**                 bufferText;             //!< A list of stored bufferTexts for the display of the buffer
     Text*                  inputLineText;          //!< The inputLine of the Shell
+    unsigned int           textSize;               //!< The size of the text.
+    unsigned int           lineSpacing;            //!< The Spacing between lines.
 
     char                   bufferArray[10000];     //!< a BUFFER for fast writing
-
 };
 
