Index: orxonox/trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4861)
+++ orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4862)
@@ -432,5 +432,5 @@
 void GraphicsEngine::draw() const
 {
-  Render2D::getInstance()->draw();
+  Render2D::getInstance()->draw(E2D_ALL_LAYERS);
   LightManager::getInstance()->draw();
 }
Index: orxonox/trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/render2D/element_2d.cc	(revision 4861)
+++ orxonox/trunk/src/lib/graphics/render2D/element_2d.cc	(revision 4862)
@@ -57,5 +57,5 @@
   this->setPosition2D(0,0);
   this->setAlignment(E2D_ALIGN_NONE);
-  this->setLayer(E2D_TOP);
+  this->layer = E2D_TOP;
 
   Render2D::getInstance()->registerElement2D(this);
@@ -98,4 +98,15 @@
   else if (!strcmp(alignment, "screen-center"))
     this->setAlignment(E2D_ALIGN_SCREEN_CENTER);
+}
+
+
+/**
+ * moves a Element to another layer
+ * @param layer the Layer this is drawn on
+ */
+void Element2D::setLayer(E2D_LAYER layer)
+{
+  Render2D::getInstance()->moveToLayer(this, layer);
+  this->layer = layer;
 }
 
Index: orxonox/trunk/src/lib/graphics/render2D/element_2d.h
===================================================================
--- orxonox/trunk/src/lib/graphics/render2D/element_2d.h	(revision 4861)
+++ orxonox/trunk/src/lib/graphics/render2D/element_2d.h	(revision 4862)
@@ -16,12 +16,13 @@
 typedef enum
 {
-  E2D_TOP,                             //!< Will be rendered on top of everything else
-  E2D_MEDIUM,                          //!< Will be rendered on the medium Layer.
-  E2D_BOTTOM,                          //!< Will be rendered on the bottom Layer
-  E2D_BELOW_ALL,                       //!< Will be rendered below the 3D-scene. @todo make this work.
+  E2D_BELOW_ALL                 =     1,        //!< Will be rendered below the 3D-scene. @todo make this work.
+  E2D_BOTTOM                    =     2,        //!< Will be rendered on the bottom Layer
+  E2D_MEDIUM                    =     4,        //!< Will be rendered on the medium Layer.
+  E2D_TOP                       =     8,        //!< Will be rendered on top of everything else
 
-  E2D_LAYER_COUNT                      //!< The count of Layers.
-} E2DLayer;
-
+  E2D_LAYER_COUNT               =     4         //!< The count of Layers.
+} E2D_LAYER;
+#define E2D_DEFAULT_LAYER       E2D_TOP
+#define E2D_ALL_LAYERS          E2D_TOP | E2D_MEDIUM | E2D_BOTTOM | E2D_BELOW_ALL
 
 typedef enum
@@ -56,12 +57,17 @@
     /** this returns the Absolute Position on the screen set by positioning in the tick-phase */
     inline const Position2D& getPosition2D() { return this->absPos2D; };
+
     /** @param alignment the new Alignment of the 2D-Element */
     inline void setAlignment(E2D_ALIGNMENT alignment) { this->alignment = alignment; };
     void setAlignment(const char* alignment);
-    /** @param layer the Layer this is drawn on */
-    inline void setLayer(E2DLayer layer) { this->layer = layer; };
+
+    void setLayer(E2D_LAYER layer);
     void setLayer(const char* layer);
+    /** @returns the Layer this Element is drawn to */
+    inline E2D_LAYER getLayer() { return this->layer; };
+
     /** @param visible true if the Element should be visible false otherwise (will not be rendered) */
     inline void setVisibility(bool visible) { this->visible = visible; };
+
     /** @param bindNode the Node this 2D-element should follow. if NULL the Element will not follow anything */
     inline void setBindNode(const PNode* bindNode) { this->bindNode = bindNode; };
@@ -86,5 +92,5 @@
   private:
     bool                    visible;
-    E2DLayer                layer;
+    E2D_LAYER               layer;
 };
 
Index: orxonox/trunk/src/lib/graphics/render2D/render_2d.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/render2D/render_2d.cc	(revision 4861)
+++ orxonox/trunk/src/lib/graphics/render2D/render_2d.cc	(revision 4862)
@@ -23,4 +23,6 @@
 #include "element_2d.h"
 
+#include <math.h>
+
 using namespace std;
 
@@ -35,5 +37,6 @@
    this->setName("Render2D");
 
-   this->element2DList = new tList<Element2D>;
+   for (int i = 0; i < E2D_LAYER_COUNT; i++)
+     this->element2DList[i] = new tList<Element2D>;
 }
 
@@ -48,5 +51,6 @@
 Render2D::~Render2D ()
 {
-  delete this->element2DList;
+  for (int i = 0; i < E2D_LAYER_COUNT; i++)
+    delete this->element2DList[i];
 
   Render2D::singletonRef = NULL;
@@ -62,5 +66,5 @@
 void Render2D::registerElement2D(Element2D* element2D)
 {
-  this->element2DList->add(element2D);
+  this->element2DList[(int)log2(E2D_DEFAULT_LAYER)]->add(element2D);
 }
 
@@ -73,19 +77,37 @@
 void Render2D::unregisterElement2D(Element2D* element2D)
 {
-  this->element2DList->remove(element2D);
+  this->element2DList[(int)log2(element2D->getLayer())]->remove(element2D);
 }
 
 
+/**
+ * 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)
+{
+  this->element2DList[(int)log2(element2D->getLayer())]->remove(element2D);
+  this->element2DList[(int)log2(to)]->add(element2D);
+}
+
+
+/**
+ * ticks all the 2d-elements
+ * @param dt the timestep since last dt
+ */
 void Render2D::tick(float dt)
 {
-  tIterator<Element2D>* iterator = this->element2DList->getIterator();
-  Element2D* elem = iterator->nextElement();
-  while (elem != NULL)
+  for (int i = 0; i < E2D_LAYER_COUNT; i++)
   {
-    elem->tick(dt);
-    elem = iterator->nextElement();
+    tIterator<Element2D>* iterator = this->element2DList[i]->getIterator();
+    Element2D* elem = iterator->nextElement();
+    while (elem != NULL)
+    {
+      elem->tick(dt);
+      elem = iterator->nextElement();
+    }
+    delete iterator;
   }
-  delete iterator;
-
 }
 
@@ -93,18 +115,28 @@
  * renders all the Elements of the Render2D-engine
  */
-void Render2D::draw() const
+void Render2D::draw(unsigned int layer) const
 {
   GraphicsEngine::enter2DMode();
 
-  tIterator<Element2D>* iterator = this->element2DList->getIterator();
-  Element2D* elem = iterator->nextElement();
-  while (elem != NULL)
+  int drawLayer = 1;
+
+  for (int i = 0; i < E2D_LAYER_COUNT; i++)
   {
-    if (elem->isVisible())
-      elem->draw();
-    elem = iterator->nextElement();
+    if (layer & drawLayer && this->element2DList[i]->getSize() > 0)
+    {
+      tIterator<Element2D>* iterator = this->element2DList[i]->getIterator();
+      Element2D* elem = iterator->nextElement();
+      while (elem != NULL)
+      {
+        if (elem->isVisible())
+          elem->draw();
+        elem = iterator->nextElement();
+      }
+      delete iterator;
+    }
+    drawLayer << 1;
   }
-  delete iterator;
 
   GraphicsEngine::leave2DMode();
+
 }
Index: orxonox/trunk/src/lib/graphics/render2D/render_2d.h
===================================================================
--- orxonox/trunk/src/lib/graphics/render2D/render_2d.h	(revision 4861)
+++ orxonox/trunk/src/lib/graphics/render2D/render_2d.h	(revision 4862)
@@ -22,14 +22,16 @@
 
   void tick(float dt);
-  void draw() const;
+  void draw(unsigned int layer) const;
 
   void registerElement2D(Element2D* element2D);
   void unregisterElement2D(Element2D* element2D);
+  void moveToLayer(Element2D* element2D, E2D_LAYER to);
 
  private:
   Render2D();
-  static Render2D*              singletonRef;           //!< Reference to this class.
+  static Render2D*              singletonRef;                    //!< Reference to this class.
 
-  tList<Element2D>*             element2DList;          //!< List of all valid 2D-elements.
+//  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.
 };
 
