Index: /trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- /trunk/src/lib/graphics/render2D/element_2d.cc	(revision 5250)
+++ /trunk/src/lib/graphics/render2D/element_2d.cc	(revision 5251)
@@ -36,6 +36,6 @@
 /**
  * standard constructor
- * @todo this constructor is not jet implemented - do it
-*/
+ * @param parent the Parent of this node (default NULL)
+ */
 Element2D::Element2D (Element2D* parent)
 {
@@ -48,5 +48,5 @@
 /**
  * standard deconstructor
-*/
+ */
 Element2D::~Element2D ()
 {
@@ -54,18 +54,17 @@
   Render2D::getInstance()->unregisterElement2D(this);
 
-  if (this->parent)
-    this->parent->removeChild2D(this);
-  else
-  {
-    tIterator<Element2D>* iterator = this->children->getIterator();
-    Element2D* pn = iterator->firstElement();
-    while( pn != NULL)
-    {
-      delete pn;
-      pn = iterator->nextElement();
-    }
-    delete iterator;
-    /* this deletes all children in the list */
-  }
+  this->remove2D();
+//   else
+//   {
+//     tIterator<Element2D>* iterator = this->children->getIterator();
+//     Element2D* pn = iterator->firstElement();
+//     while( pn != NULL)
+//     {
+//       delete pn;
+//       pn = iterator->nextElement();
+//     }
+//     delete iterator;
+//     /* this deletes all children in the list */
+//   }
   delete this->children;
 
@@ -90,7 +89,15 @@
   this->bindNode = NULL;
 
+  // PNODE-stuff
+  this->children = new tList<Element2D>;
   this->setParentMode2D(E2D_PARENT_ALL);
-  this->parent = NULL;
-  this->children = new tList<Element2D>;
+  if (NullElement2D::isInstanciated())
+  {
+    this->parent = NullElement2D::getInstance();
+    NullElement2D::getInstance()->children->add(this);
+    NullElement2D::getInstance()->debug(0);
+  }
+  else
+    this->parent = NULL;
   this->absDirection = 0.0;
   this->relDirection = 0.0;
@@ -442,5 +449,4 @@
   if( likely(child->parent != NULL))
   {
-    PRINTF(4)("Element2D::addChild() - reparenting node: removing it and adding it again\n");
     child->parent->children->remove(child);
   }
@@ -505,5 +511,6 @@
 void Element2D::setParent2D (Element2D* parent)
 {
-  parent->addChild2D(this);
+  if (parent != NULL)
+    parent->addChild2D(this);
 }
 
@@ -517,5 +524,4 @@
   if (parentNode != NULL)
     parentNode->addChild2D(this);
-
 }
 
Index: /trunk/src/lib/graphics/render2D/element_2d.h
===================================================================
--- /trunk/src/lib/graphics/render2D/element_2d.h	(revision 5250)
+++ /trunk/src/lib/graphics/render2D/element_2d.h	(revision 5251)
@@ -218,5 +218,6 @@
   public:
     /** @returns a Pointer to the only object of this Class */
-    inline static NullElement2D* getInstance() { if (!singletonRef) singletonRef = new NullElement2D();  return singletonRef; };
+    inline static NullElement2D* getInstance() { if (!NullElement2D::singletonRef) NullElement2D::singletonRef = new NullElement2D();  return NullElement2D::singletonRef; };
+    inline static bool isInstanciated() { return (likely(NullElement2D::singletonRef != NULL))?true:false; };
     virtual ~NullElement2D ();
 
Index: /trunk/src/lib/shell/shell.cc
===================================================================
--- /trunk/src/lib/shell/shell.cc	(revision 5250)
+++ /trunk/src/lib/shell/shell.cc	(revision 5251)
@@ -64,4 +64,6 @@
   this->lineSpacing = 0;
   this->bActive = false;
+  this->fontFile = NULL;
+  this->setFont("fonts/dpquake_.ttf");
 
   // BUFFER
@@ -88,5 +90,5 @@
   delete[] this->bufferText;
   delete this->bufferIterator;
-
+  delete[] this->fontFile;
   // delete the inputLine
   delete this->shellInput;
@@ -123,4 +125,7 @@
 void Shell::deactivate()
 {
+   this->setFont("fonts/dark_crystal.ttf");
+   this->rebuildText();
+
   if (this->bActive == false)
     PRINTF(3)("The shell is already inactive\n");
@@ -140,4 +145,18 @@
 
   this->bufferOffset = 0;
+}
+
+/**
+ * sets the File to load the fonts from
+ * @param fontFile the file to load the font from
+ */
+void Shell::setFont(const char* fontFile)
+{
+  if (this->fontFile != NULL)
+    delete[] this->fontFile;
+
+  this->fontFile = new char[strlen(fontFile)+1];
+  strcpy(this->fontFile, fontFile);
+
 }
 
@@ -154,5 +173,5 @@
   this->textSize = textSize;
   this->lineSpacing = lineSpacing;
-  this->shellInput->setFont("fonts/dpquake_.ttf", this->textSize);
+  this->shellInput->setFont(this->fontFile, this->textSize);
 
 //  this->rebuildText();
@@ -166,5 +185,5 @@
 void Shell::rebuildText()
 {
-  this->shellInput->setFont("fonts/dpquake_.ttf", this->textSize);
+  this->shellInput->setFont(this->fontFile, this->textSize);
   this->shellInput->setColor(1, 0, 0);
   this->shellInput->setAlignment(TEXT_ALIGN_LEFT);
@@ -181,33 +200,36 @@
 void Shell::setBufferDisplaySize(unsigned int bufferDisplaySize)
 {
+  Text** bufferText = this->bufferText;
+  this->bufferText = NULL;
+  if (bufferText != NULL)
+  {
+    for (unsigned int i = 0; i < this->bufferDisplaySize; i++)
+      delete bufferText[i];
+    delete[] bufferText;
+  }
+
+  bufferText = new Text*[bufferDisplaySize];
+  for (unsigned int i = 0; i < bufferDisplaySize; i++)
+  {
+    bufferText[i] = TextEngine::getInstance()->createText(this->fontFile, this->textSize, TEXT_RENDER_DYNAMIC);
+    bufferText[i]->setColor(1, 0, 0);
+    bufferText[i]->setAlignment(TEXT_ALIGN_LEFT);
+    bufferText[i]->setRelCoor2D(calculateLinePosition(i));
+    bufferText[i]->setText(NULL);
+    bufferText[i]->setParent2D(this);
+  }
+  this->bufferDisplaySize = bufferDisplaySize;
+
+  this->bufferText = bufferText;
+  this->shellHeight = (this->textSize + this->lineSpacing) * (bufferDisplaySize+1);
+}
+
+/**
+ * deletes all the Buffers
+ */
+void Shell::flush()
+{
+  // remove all chars from the BufferTexts.
   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/dpquake_.ttf", this->textSize, TEXT_RENDER_DYNAMIC);
-    this->bufferText[i]->setColor(1, 0, 0);
-    this->bufferText[i]->setAlignment(TEXT_ALIGN_LEFT);
-    this->bufferText[i]->setRelCoor2D(calculateLinePosition(i));
-    this->bufferText[i]->setText(NULL);
-    this->bufferText[i]->setParent2D(this);
-  }
-  this->bufferDisplaySize = bufferDisplaySize;
-
-  this->shellHeight = (this->textSize + this->lineSpacing) * (bufferDisplaySize+1);
-}
-
-/**
- * deletes all the Buffers
- */
-void Shell::flush()
-{
-  // remove all chars from the BufferTexts.
-  if (this->bufferText)
     for (int i = 0; i < this->bufferDisplaySize; i++)
     {
Index: /trunk/src/lib/shell/shell.h
===================================================================
--- /trunk/src/lib/shell/shell.h	(revision 5250)
+++ /trunk/src/lib/shell/shell.h	(revision 5251)
@@ -48,4 +48,5 @@
     inline bool isActive() const { return this->bActive; };
 
+    void setFont(const char* fontFile);
     void setTextSize(unsigned int textSize, unsigned int lineSpacing = 1);
     void rebuildText();
@@ -83,5 +84,5 @@
     unsigned int             lineSpacing;            //!< The Spacing between lines.
     unsigned int             textSize;               //!< The size of the text.
-    char*                    textFont;               //!< The file containing the font.
+    char*                    fontFile;               //!< The file containing the font.
 
     // HANDLING TEXT INPUT
