Index: /trunk/src/lib/graphics/text_engine/multi_line_text.cc
===================================================================
--- /trunk/src/lib/graphics/text_engine/multi_line_text.cc	(revision 7756)
+++ /trunk/src/lib/graphics/text_engine/multi_line_text.cc	(revision 7757)
@@ -26,10 +26,10 @@
  * @param type The renderType to display this font in
  */
-MultiLineText::MultiLineText(const std::string& fontFile, unsigned int textSize, unsigned int lineWidth)
+MultiLineText::MultiLineText(const std::string& fontFile, unsigned int textSize, float lineWidth)
   : Text(fontFile, textSize)
 {
   this->setClassID(CL_MULTI_LINE_TEXT, "MultiLineText");
 
-  this->lineSpacing = 1.0f;
+  this->lineSpacing = 1.0;
   this->lineCount = 0;
   this->setLineWidth(lineWidth);
@@ -93,9 +93,9 @@
   for (unsigned int i = 0; i < this->getText().size(); ++i)
   {
-    if (unlikely(!this->lineEnds.empty() && i == this->lineEnds[lineNumber]))
+    if (unlikely(this->lineEnds.size() > lineNumber && i == this->lineEnds[lineNumber]))
     {
       // go to the next Line.
       ++lineNumber;
-      posX = 0.0f;
+      posX = 10.0f;
       posY += this->lineSpacing + this->getSize(); //this->getFont()->getMaxHeight();
     }
@@ -149,6 +149,21 @@
       width += this->getFont()->getGlyphArray()[this->getText()[i]]->advance;
   }
-
-  this->lineCount = lineEnds.size()+1;
+  this->lineCount = lineEnds.size() + 1;
   this->setSizeY2D((this->lineEnds.size()+1) * (this->lineSpacing + this->getFont()->getMaxHeight()));
 }
+
+void MultiLineText::debug() const
+{
+ printf("Debug %s::%s: %d lines\n", this->getClassName(), this->getName(), this->getLineCount());
+
+ std::string tmpText = this->getText();
+ std::vector<unsigned int> ends = this->lineEnds;
+ ends.push_back(tmpText.size());
+
+ unsigned int prev = 0;
+  for (unsigned int i = 0; i < ends.size(); i++)
+  {
+    printf("Line %d: %s\n", i, tmpText.substr(prev, ends[i] - prev).c_str());
+    prev = ends[i];
+  }
+}
Index: /trunk/src/lib/graphics/text_engine/multi_line_text.h
===================================================================
--- /trunk/src/lib/graphics/text_engine/multi_line_text.h	(revision 7756)
+++ /trunk/src/lib/graphics/text_engine/multi_line_text.h	(revision 7757)
@@ -15,5 +15,5 @@
 {
   public:
-    MultiLineText(const std::string& fontFile = "", unsigned int fontSize = TEXT_DEFAULT_SIZE, unsigned int lineWidth = 100.0);
+    MultiLineText(const std::string& fontFile = "", unsigned int fontSize = TEXT_DEFAULT_SIZE, float lineWidth = 100.0);
 
     // Setup:
@@ -30,4 +30,6 @@
     virtual void draw() const;
 
+    void debug() const;
+
   protected:
     virtual void setupTextWidth();
Index: /trunk/src/lib/shell/shell.cc
===================================================================
--- /trunk/src/lib/shell/shell.cc	(revision 7756)
+++ /trunk/src/lib/shell/shell.cc	(revision 7757)
@@ -67,4 +67,5 @@
     EventHandler::getInstance()->subscribe(this, ES_SHELL, SDLK_PAGEUP);
     EventHandler::getInstance()->subscribe(this, ES_SHELL, SDLK_PAGEDOWN);
+    EventHandler::getInstance()->subscribe(this, ES_SHELL, EV_VIDEO_RESIZE);
 
     // BUFFER
@@ -76,4 +77,5 @@
 
     // Element2D and generals
+    this->setSizeX2D(GraphicsEngine::getInstance()->getResolutionX());
     this->setAbsCoor2D(3, -400);
     this->textSize = 15;
@@ -136,5 +138,6 @@
         (*text)->setText("");
     }
-    repositionText();
+    this->updateResolution( GraphicsEngine::getInstance()->getResolutionX());
+    this->repositionText();
   }
 
@@ -226,4 +229,20 @@
   {
     this->backgroundMaterial.setDiffuseMap(fileName);
+  }
+
+
+  /**
+   * @brief updates the Shell's Width
+   * @param width the new Width.
+   */
+  void Shell::updateResolution(unsigned int width)
+  {
+    if (width == this->getSizeX2D())
+      return;
+    this->setSizeX2D(width);
+    for (std::list<MultiLineText*>::iterator textIt = this->bufferText.begin(); textIt != this->bufferText.end(); ++textIt)
+    {
+      (*textIt)->setLineWidth(width);
+    }
   }
 
@@ -402,5 +421,5 @@
 
 
-      (*textIt)->setRelCoor2D(calculateLinePosition( (linePos++ > 0)? linePos : 0));
+      (*textIt)->setRelCoor2D(calculateLinePosition( (linePos++ > 0) ? linePos : 0));
       (*textIt)->setText((*it));
     }
@@ -446,4 +465,9 @@
         this->moveDisplayBuffer(-this->bufferDisplaySize+1);
       }
+      else if (event.type == EV_VIDEO_RESIZE)
+      {
+        this->updateResolution(event.resize.w);
+        this->repositionText();
+      }
     }
   }
@@ -487,5 +511,5 @@
   Vector2D Shell::calculateLinePosition(unsigned int lineNumber)
   {
-    return Vector2D(5, (int)(this->textSize + this->lineSpacing)*(int)((int)this->bufferDisplaySize - (int)lineNumber - (int)2) + (int)this->textSize);
+    return Vector2D(5.0f, (float)(this->textSize + this->lineSpacing)*(float)((int)this->bufferDisplaySize - (int)lineNumber - (int)1));
   }
 
Index: /trunk/src/lib/shell/shell.h
===================================================================
--- /trunk/src/lib/shell/shell.h	(revision 7756)
+++ /trunk/src/lib/shell/shell.h	(revision 7757)
@@ -81,4 +81,5 @@
     void testShell() const;
   private:
+    void updateResolution(unsigned int width);
     void repositionText();
     void applyTextSettings(Text* text);
