Index: /trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- /trunk/src/lib/graphics/render2D/element_2d.cc	(revision 5400)
+++ /trunk/src/lib/graphics/render2D/element_2d.cc	(revision 5401)
@@ -35,5 +35,4 @@
 {
   this->init();
-  Render2D::getInstance()->registerElement2D(this);
   this->setParent2D(NullElement2D::getInstance());
 }
@@ -49,5 +48,4 @@
 {
   this->init();
-  Render2D::getInstance()->registerElement2D(this);
 
   // check Parenting, and if ok parent the stuff
@@ -69,12 +67,9 @@
  * 2. instance->remove2D(); delete instance;
  *   -> result:
- *    moves its children to the NullParent
+ *    moves its children to the NullElement2D
  *    then deletes the Element.
  */
 Element2D::~Element2D ()
 {
-  // delete what has to be deleted here
-  Render2D::getInstance()->unregisterElement2D(this);
-
   // remove the Node, delete it's children.
   tIterator<Element2D>* iterator = this->children->getIterator();
@@ -203,5 +198,8 @@
 void Element2D::setLayer(E2D_LAYER layer)
 {
-  Render2D::getInstance()->moveToLayer(this, layer);
+
+
+
+
   this->layer = layer;
 }
@@ -209,16 +207,9 @@
 /**
  * sets the layer onto which this 2D-element is projected to.
- * @param layer the layer @see loadParams
+ * @param layer the layer @see loadParams @see Element2D::charToLayer2D(const char* layer)
  */
 void Element2D::setLayer(const char* layer)
 {
-  if (!strcmp(layer, "top"))
-    this->setLayer(E2D_LAYER_TOP);
-  else if (!strcmp(layer, "medium"))
-    this->setLayer(E2D_LAYER_MEDIUM);
-  else if (!strcmp(layer, "bottom"))
-    this->setLayer(E2D_LAYER_BOTTOM);
-  else if (!strcmp(layer, "below-all"))
-    this->setLayer(E2D_LAYER_BELOW_ALL);
+  this->setLayer(Element2D::charToLayer2D(layer));
 }
 
@@ -771,13 +762,14 @@
   else
     PRINT(0)(" -");
-  PRINT(0)("Element2D(%s::%s) - absCoord: (%0.2f, %0.2f), relCoord(%0.2f, %0.2f), direction(%0.2f) - %s\n",
-  this->getClassName(),
-  this->getName(),
-  this->absCoordinate.x,
-  this->absCoordinate.y,
-  this->relCoordinate.x,
-  this->relCoordinate.y,
-  this->getAbsDir2D(),
-  Element2D::parentingModeToChar2D(parentMode));
+  PRINT(0)("Element2D(%s::%s) - absCoord: (%0.2f, %0.2f), relCoord(%0.2f, %0.2f), direction(%0.2f) - %s, layer:%s\n",
+            this->getClassName(),
+            this->getName(),
+            this->absCoordinate.x,
+            this->absCoordinate.y,
+            this->relCoordinate.x,
+            this->relCoordinate.y,
+            this->getAbsDir2D(),
+            Element2D::parentingModeToChar2D(parentMode),
+            Element2D::layer2DToChar(this->layer));
   if (depth >= 2 || depth == 0)
   {
@@ -799,8 +791,46 @@
  * ticks the 2d-Element
  * @param dt the time elapsed since the last tick
- */
-void Element2D::tick(float dt)
-{
-
+ *
+ * the element only gets tickt, if it is active.
+ * Be aware, that this walks through the entire Element2D-tree,
+ * searching for Elements to be ticked.
+ */
+void Element2D::tick2D(float dt)
+{
+  if (this->active)
+    this->tick(dt);
+  if (this->children->getSize() > 0)
+  {
+    tIterator<Element2D>* tickIT = children->getIterator();
+    Element2D* tickElem = tickIT->firstElement();
+    while (tickElem != NULL)
+    {
+      tickElem->tick2D(dt);
+      tickElem = tickIT->nextElement();
+    }
+    delete tickIT;
+  }
+}
+
+/**
+ * draws all the Elements from this element2D downwards
+ * @param layer the maximal Layer to draw.
+ */
+void Element2D::draw2D(E2D_LAYER layer) const
+{
+  if (this->visible)
+    this->draw();
+  if (this->children->getSize() >0)
+  {
+    tIterator<Element2D>* drawIT = children->getIterator();
+    Element2D* drawElem = drawIT->firstElement();
+    while (drawElem != NULL)
+    {
+      if (likely(layer >= this->layer))
+        drawElem->draw2D(layer);
+      drawElem = drawIT->nextElement();
+    }
+    delete drawIT;
+  }
 }
 
@@ -853,4 +883,50 @@
 }
 
+/**
+ * converts a layer into its corresponding string
+ * @param layer the layer to get the name-String of.
+ * @returns the Name of the Layer (on error the default-layer-string is returned)
+ */
+const char* Element2D::layer2DToChar(E2D_LAYER layer)
+{
+  switch(layer)
+  {
+    case E2D_LAYER_TOP:
+      return "top";
+      break;
+    case E2D_LAYER_MEDIUM:
+      return "medium";
+      break;
+    case E2D_LAYER_BOTTOM:
+      return "bottom";
+      break;
+    case E2D_LAYER_BELOW_ALL:
+      return "below-all";
+      break;
+    default:
+      return layer2DToChar(E2D_DEFAULT_LAYER);
+      break;
+  }
+}
+
+/**
+ * converts a String holding a actual Layer
+ * @param layer the String to convert into a Layer2D
+ * @returns the E2D_LAYER on success, E2D_DEFAULT_LAYER on error.
+ */
+E2D_LAYER Element2D::charToLayer2D(const char* layer)
+{
+  if (!strcmp(layer, "top"))
+    return (E2D_LAYER_TOP);
+  else  if (!strcmp(layer, "medium"))
+    return (E2D_LAYER_MEDIUM);
+  else  if (!strcmp(layer, "bottom"))
+    return (E2D_LAYER_BOTTOM);
+  else  if (!strcmp(layer, "below-all"))
+    return (E2D_LAYER_BELOW_ALL);
+  else
+    return (E2D_DEFAULT_LAYER);
+}
+
 
 
Index: /trunk/src/lib/graphics/render2D/element_2d.h
===================================================================
--- /trunk/src/lib/graphics/render2D/element_2d.h	(revision 5400)
+++ /trunk/src/lib/graphics/render2D/element_2d.h	(revision 5401)
@@ -2,7 +2,5 @@
  * @file element_2d.h
  * Definition of the 2D elements rendered on top through the GraphicsEngine
- *
- * @todo reimplement it, so it looks just like PNode.
-*/
+ */
 
 #ifndef _ELEMENT_2D_H
@@ -107,4 +105,10 @@
     inline float getSizeX2D() const { return this->sizeX; };
     inline float getSizeY2D() const { return this->sizeY; };
+
+  public:
+    virtual void tick(float dt) {};
+    virtual void draw() const = 0;
+    void tick2D(float dt);
+    void draw2D(E2D_LAYER layer) const;
 
     // LIKE PNODE
@@ -178,4 +182,7 @@
     static E2D_PARENT_MODE charToParentingMode2D(const char* parentingMode);
 
+    static const char* layer2DToChar(E2D_LAYER layer);
+    static E2D_LAYER charToLayer2D(const char* layer);
+
   private:
     /** tells the child that the parent's Coordinate has changed */
@@ -186,7 +193,5 @@
     inline Vector getLastAbsCoor() { return this->lastAbsCoordinate; }
 
-  public:
-    virtual void tick(float dt);
-    virtual void draw() const = 0;
+
 
   private:
Index: /trunk/src/lib/graphics/render2D/render_2d.cc
===================================================================
--- /trunk/src/lib/graphics/render2D/render_2d.cc	(revision 5400)
+++ /trunk/src/lib/graphics/render2D/render_2d.cc	(revision 5401)
@@ -34,7 +34,4 @@
    this->setClassID(CL_RENDER_2D, "Render2D");
    this->setName("Render2D");
-
-   for (int i = 0; i < E2D_LAYER_COUNT; i++)
-     this->element2DList[i] = new tList<Element2D>;
 }
 
@@ -51,60 +48,6 @@
   delete NullElement2D::getInstance();
 
-  for (int i = 0; i < E2D_LAYER_COUNT; i++)
-    delete this->element2DList[i];
-
   Render2D::singletonRef = NULL;
 }
-
-
-/**
- * registers a 2D-element to the 2D-Renderer
- * @param element2D the element to registers
- *
- * do not use this function by yourself, because this is used by Element2D's constructor
- */
-void Render2D::registerElement2D(Element2D* element2D)
-{
-  if (likely(element2D != NULL) && element2D->getLayer() < E2D_LAYER_COUNT && element2D->getLayer() != E2D_LAYER_EXTERN)
-    this->element2DList[element2D->getLayer()]->add(element2D);
-  // DEBUG printf("::::%p, %d %d \n", element2D, element2D->getLayer(), this->element2DList[element2D->getLayer()]->getSize());
-}
-
-
-/**
- * unregisters a 2D-element from the 2D-Renderer
- * @param element2D The element to unregister
- *
- * do not use this function by yourself, because this is used by Element2D's destructor
- */
-void Render2D::unregisterElement2D(Element2D* element2D)
-{
-  if (likely(element2D != NULL) && element2D->getLayer() < E2D_LAYER_COUNT && element2D->getLayer() != E2D_LAYER_EXTERN)
-    this->element2DList[element2D->getLayer()]->remove(element2D);
-    // DEBUG  printf(":::%s layer: %d, %d\n", element2D->getClassName(), element2D->getLayer(), this->element2DList[element2D->getLayer()]->getSize());
-}
-
-
-/**
- * moves an 2D-Element to another Layer
- * @param element2D the Element to move
- * @param to which layer to move it to.
- */
-void Render2D::moveToLayer(Element2D* element2D, E2D_LAYER to)
-{
-  if (element2D == NULL)
-    return;
-
-  if (E2D_LAYER_COUNT  < to)
-    to = E2D_DEFAULT_LAYER;
-  if (likely(element2D->getLayer() != to))
-  {
-    if (element2D->getLayer() != E2D_LAYER_EXTERN)
-      this->element2DList[element2D->getLayer()]->removeFromLast(element2D);
-    if (to != E2D_LAYER_EXTERN)
-      this->element2DList[to]->add(element2D);
-  }
-}
-
 
 /**
@@ -114,16 +57,5 @@
 void Render2D::tick(float dt)
 {
-  for (int i = 0; i < E2D_LAYER_COUNT; i++)
-  {
-    tIterator<Element2D>* iterator = this->element2DList[i]->getIterator();
-    Element2D* elem = iterator->firstElement();
-    while (elem != NULL)
-    {
-      if (elem->isActive())
-        elem->tick(dt);
-      elem = iterator->nextElement();
-    }
-    delete iterator;
-  }
+  NullElement2D::getInstance()->tick2D(dt);
 }
 
@@ -135,38 +67,5 @@
 {
   GraphicsEngine::enter2DMode();
-
-  if (layer != E2D_LAYER_ALL)
-  {
-    if (likely(layer != E2D_LAYER_EXTERN && this->element2DList[layer]->getSize() > 0))
-    {
-      tIterator<Element2D>* iterator = this->element2DList[layer]->getIterator();
-      Element2D* elem = iterator->firstElement();
-      while (elem != NULL)
-      {
-        if (elem->isVisible())
-          elem->draw();
-        elem = iterator->nextElement();
-      }
-      delete iterator;
-    }
-  }
-  else  // if (layer != E2D_LAYER_ALL)
-  {
-    for (int i = 0; i < E2D_LAYER_COUNT; i++)
-    {
-      if (this->element2DList[i]->getSize() > 0)
-      {
-        tIterator<Element2D>* iterator = this->element2DList[i]->getIterator();
-        Element2D* elem = iterator->firstElement();
-        while (elem != NULL)
-        {
-          if (elem->isVisible())
-            elem->draw();
-          elem = iterator->nextElement();
-        }
-        delete iterator;
-      }
-    }
-  }
+  NullElement2D::getInstance()->draw2D(E2D_LAYER_ALL);
   GraphicsEngine::leave2DMode();
 }
Index: /trunk/src/lib/graphics/render2D/render_2d.h
===================================================================
--- /trunk/src/lib/graphics/render2D/render_2d.h	(revision 5400)
+++ /trunk/src/lib/graphics/render2D/render_2d.h	(revision 5401)
@@ -25,17 +25,9 @@
     void draw(E2D_LAYER layer) const;
 
-
   private:
-    void registerElement2D(Element2D* element2D);
-    void unregisterElement2D(Element2D* element2D);
-    void moveToLayer(Element2D* element2D, E2D_LAYER to);
-
-
     Render2D();
     static Render2D*              singletonRef;                    //!< Reference to this class.
 
-//  tList<Element2D>*             element2DList;                   //!< List of all valid 2D-elements.
-    tList<Element2D>*             element2DList[E2D_LAYER_COUNT];  //!< List of all valid 2D-elements in the different Layers.
-};
+ };
 
 #endif /* _RENDER_2D_H */
Index: /trunk/src/lib/gui/gl_gui/glgui_handler.cc
===================================================================
--- /trunk/src/lib/gui/gl_gui/glgui_handler.cc	(revision 5400)
+++ /trunk/src/lib/gui/gl_gui/glgui_handler.cc	(revision 5401)
@@ -14,5 +14,5 @@
 */
 
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI
 
 #include "glgui_handler.h"
Index: /trunk/src/story_entities/world.cc
===================================================================
--- /trunk/src/story_entities/world.cc	(revision 5400)
+++ /trunk/src/story_entities/world.cc	(revision 5401)
@@ -99,5 +99,4 @@
   this->path = NULL;
   this->constuctorInit(name, -1);
-  //NullParent* np = NullParent::getInstance();
 }
 
@@ -1027,5 +1026,4 @@
                   Vector* relCoor, Quaternion* relDir)
 {
-  NullParent::getInstance();
   if( parentNode != NULL)
     {
