Index: branches/2d-recalc/src/lib/graphics/graphics_engine.cc
===================================================================
--- branches/2d-recalc/src/lib/graphics/graphics_engine.cc	(revision 5380)
+++ branches/2d-recalc/src/lib/graphics/graphics_engine.cc	(revision 5381)
@@ -410,9 +410,8 @@
      depending on how you have your OpenGL state set up.
   */
-  glPushAttrib(GL_ENABLE_BIT);
+  glPushAttrib(GL_ENABLE_BIT); // storte the state of all enable-bits.
   glDisable(GL_DEPTH_TEST);
   glDisable(GL_CULL_FACE);
-  glDisable(GL_LIGHTING);  // will be set back when leaving 2D-mode
-
+  glDisable(GL_LIGHTING);
   glViewport(0, 0, screen->w, screen->h);
 
Index: branches/2d-recalc/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- branches/2d-recalc/src/lib/graphics/render2D/element_2d.cc	(revision 5380)
+++ branches/2d-recalc/src/lib/graphics/render2D/element_2d.cc	(revision 5381)
@@ -111,5 +111,5 @@
   this->setActiveness(true);
   this->setAlignment(E2D_ALIGN_NONE);
-  this->layer = E2D_TOP;
+  this->layer = E2D_DEFAULT_LAYER;
   this->bindNode = NULL;
 
@@ -254,5 +254,5 @@
 /**
  * sets a node, this 2D-Element should be shown upon
- * @param bindNode the name of the Node (should be existing)
+ * @param bindNode the name of the Node (should already be existing)
  */
 void Element2D::setBindNode(const char* bindNode)
@@ -280,15 +280,4 @@
 
 /**
- * sets the relative coordinate of the Element2D to its Parent
- * @param x the x coordinate
- * @param y the y coordinate
- * @param z the z coordinate
- */
-void Element2D::setRelCoor2D (float x, float y, float z)
-{
-  this->setRelCoor2D(Vector(x,y,z));
-}
-
-/**
  * sets the Relative coordinate to the parent in Pixels
  * @param x the relCoord X
@@ -299,6 +288,5 @@
   this->setRelCoor2D(Vector((float)x/(float)GraphicsEngine::getInstance()->getResolutionX(),
                      (float)y/(float)GraphicsEngine::getInstance()->getResolutionY(),
-                     0
-                           ));
+                     0 ));
 }
 
@@ -332,13 +320,11 @@
 
 /**
- * set relative coordinates smoothely
- * @param x x-relative coordinates to its parent
- * @param y y-relative coordinates to its parent
- * @param z z-relative coordinates to its parent
- * @see  void PNode::setRelCoorSoft (const Vector&, float)
- */
-void Element2D::setRelCoorSoft2D(float x, float y, float depth, float bias)
-{
-  this->setRelCoorSoft2D(Vector(x, y, depth), bias);
+ * @returns the Relative coordinate of the Element2D in pixels (as float-Vector)
+ */
+Vector Element2D::getRelCoor2Dpx() const
+{
+  return Vector(this->prevRelCoordinate.x * (float)GraphicsEngine::getInstance()->getResolutionX(),
+                this->prevRelCoordinate.y * (float)GraphicsEngine::getInstance()->getResolutionY(),
+                0);
 }
 
@@ -374,15 +360,4 @@
 
 /**
- * @param x x-coordinate.
- * @param y y-coordinate.
- * @param z z-coordinate.
- * @see void PNode::setAbsCoor (const Vector& absCoord)
- */
-void Element2D::setAbsCoor2D (float x, float y, float depth)
-{
-  this->setAbsCoor2D(Vector(x, y, depth));
-}
-
-/**
  * @param x x-coordinate in Pixels
  * @param y y-coordinate in Pixels
@@ -398,4 +373,14 @@
 
 /**
+ * @returns the absolute coordinate of the Element2D in pixels (as float-Vector)
+ */
+Vector Element2D::getAbsCoor2Dpx() const
+{
+  return Vector(this->absCoordinate.x * (float)GraphicsEngine::getInstance()->getResolutionX(),
+                this->absCoordinate.y * (float)GraphicsEngine::getInstance()->getResolutionY(),
+                0);
+}
+
+/**
  *  shift coordinate ralative
  * @param shift shift vector
@@ -407,5 +392,4 @@
   this->relCoordinate += shift;
   this->bRelCoorChanged = true;
-
 }
 
@@ -684,12 +668,10 @@
     PRINTF(5)("Element2D::update - %s - (%f, %f, %f)\n", this->getName(), this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
 
-
+    // update the direction
     if( this->parentMode & E2D_PARENT_LOCAL_ROTATE && this->bRelDirChanged)
     {
-      /* update the current absDirection - remember * means rotation around sth.*/
       this->prevRelDirection = this->relDirection;
       this->absDirection = this->relDirection + parent->getAbsDir2D();;
     }
-
 
     if (this->alignment == E2D_ALIGN_SCREEN_CENTER && this->bRelCoorChanged)
@@ -700,5 +682,6 @@
       this->absCoordinate.z = 0.0;
     }
-    else if (this->bindNode)
+    // align at the bindNode.
+    else if (unlikely(this->bindNode != NULL))
     {
       GLdouble projectPos[3];
@@ -715,4 +698,6 @@
       this->absCoordinate.y = projectPos[1]/(float)GraphicsEngine::getInstance()->getResolutionY() + this->relCoordinate.y;
       this->absCoordinate.z = projectPos[2] + this->relCoordinate.z;
+      //! @todo check for corectness.
+      //       printf("%f, %f, %f\n", this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
     }
     else
Index: branches/2d-recalc/src/lib/graphics/render2D/element_2d.h
===================================================================
--- branches/2d-recalc/src/lib/graphics/render2D/element_2d.h	(revision 5380)
+++ branches/2d-recalc/src/lib/graphics/render2D/element_2d.h	(revision 5381)
@@ -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
@@ -37,5 +35,5 @@
   E2D_ALIGN_RIGHT               =     2,
   E2D_ALIGN_CENTER              =     4,
-  E2D_ALIGN_SCREEN_CENTER       =     8
+  E2D_ALIGN_SCREEN_CENTER       =     8,
 } E2D_ALIGNMENT;
 
@@ -98,5 +96,7 @@
     inline bool isActive() { return this->active; };
 
-
+    /////////////
+    // SCALING //
+    /////////////
     inline void setSize2D(float x, float y) { this->sizeX = x, this->sizeY = y; };
     void setSize2Dpx(int x, int y);
@@ -110,11 +110,20 @@
     int getSizeY2Dpx() const;
 
-    // LIKE PNODE
-  public:
+    // PNODE-STYLE-behavioral
+  public:
+    /////////////////
+    // COORDINATES //
+    /////////////////
+    // RELATIVE //
     void setRelCoor2D (const Vector& relCoord);
-    void setRelCoor2D (float x, float y, float dontCare = 1.0);
+    /** @param x x-coordinate.  @param y y-coordinate. @param z z-coordinate. @see void PNode::setRelCoor2D (const Vector& absCoord) */
+    void setRelCoor2D (float x, float y, float dontCare = 1.0) { this->setRelCoor2D(Vector(x, y, dontCare)); };
     void setRelCoor2Dpx (int x, int y);
+    inline void setRelCoor2Dpx (const Vector& relCoordpx) { this->setRelCoor2D(relCoordpx.x, relCoordpx.y); };
     void setRelCoorSoft2D (const Vector& relCoordSoft, float bias = 1.0);
-    void setRelCoorSoft2D (float x, float y, float dontCare = 1.0, float bias = 1.0);
+    /** set relative coordinates smoothely @param x x-relative coordinates to its parent
+     * @param y y-relative coordinates to its parent @param z z-relative coordinates to its parent
+     * @see  void PNode::setRelCoorSoft (const Vector&, float) */
+    void setRelCoorSoft2D (float x, float y, float dontCare = 1.0, float bias = 1.0) { this->setRelCoorSoft2D(Vector(x,y, dontCare), bias); };
     void setRelCoorSoft2Dpx (int x, int y, float bias = 1.0);
     /** @returns the relative position */
@@ -122,15 +131,26 @@
     /** @returns the Relative Coordinate Destination */
     inline const Vector& getRelCoorSoft2D() const { return (this->toCoordinate)?*this->toCoordinate:this->relCoordinate; };
-    const Vector& getRelCoor2Dpx() const;
+    Vector getRelCoor2Dpx() const;
+    // ABSOLUTE //
     void setAbsCoor2D (const Vector& absCoord);
-    void setAbsCoor2D (float x, float y, float depth = 1.0);
+    /** @param x x-coordinate.  @param y y-coordinate. @param z z-coordinate. @see void PNode::setAbsCoor2D (const Vector& absCoord) */
+    void setAbsCoor2D (float x, float y, float depth = 1.0) { this->setAbsCoor2D(Vector(x, y, depth)); };
     void setAbsCoor2Dpx (int x, int y);
     /** @returns the absolute position */
     inline const Vector& getAbsCoor2D () const { return this->absCoordinate; };
-    const Vector& getAbsCoor2Dpx () const;
+    Vector getAbsCoor2Dpx () const;
 
     void shiftCoor2D (const Vector& shift);
     void shiftCoor2Dpx (int x, int y);
 
+    /** @returns the Speed of the Node */
+    inline float getSpeed() const { return 0; };
+    /** @returns the Velocity of the Node */
+    inline const Vector& getVelocity() const { return this->velocity; };
+
+    ////////////////
+    // DIRECTIONS //
+    ////////////////
+    // RELATIVE //
     void setRelDir2D (float relDir);
     void setRelDirSoft2D(float relDirSoft, float bias = 1.0);
@@ -139,15 +159,12 @@
     /** @returns the Relative Directional Destination */
     inline float getRelDirSoft2D() const { return (this->toDirection)?*this->toDirection:this->relDirection; };
+    // ABSOLUTE //
     void setAbsDir2D (float absDir);
     /** @returns the absolute Direction */
     inline float getAbsDir2D () const { return this->absDirection; };
     void shiftDir2D (float shiftDir);
-
-    /** @returns the Speed of the Node */
-    inline float getSpeed() const { return 0; };
-    /** @returns the Velocity of the Node */
-    inline const Vector& getVelocity() const { return this->velocity; };
-
-
+    ///////////////
+    // PARENTING //
+    ///////////////
     void addChild2D (Element2D* child, int parentingMode = E2D_PARENT_NONE);
     void addChild2D (const char* childName);
@@ -169,4 +186,8 @@
     int getParentMode2D() const { return this->parentMode; };
 
+
+    //////////////
+    // HANDLING //
+    //////////////
     void update2D (float dt);
 
@@ -192,4 +213,6 @@
   private:
     const PNode*            bindNode;           //!< a node over which to display this 2D-element
+    bool                    coordinateType;     //!< true if type is [0-1],[0-1]-style, false if type is [0-ResolutionX][0-ResolutionY]-style.
+
     float                   sizeX;              //!< The size of the rendered item in x-direction
     float                   sizeY;              //!< The size of the rendered Item in y-direction
@@ -212,5 +235,4 @@
     Vector                  lastAbsCoordinate;  //!< this is used for speedcalculation, it stores the last coordinate
     float                   prevRelDirection;   //!< The last Relative Direciton from the last update-Cycle.
-//  float                   lastAbsDirection;
 
     Vector                  velocity;           //!< Saves the velocity.
Index: branches/2d-recalc/src/lib/graphics/render2D/render_2d.cc
===================================================================
--- branches/2d-recalc/src/lib/graphics/render2D/render_2d.cc	(revision 5380)
+++ branches/2d-recalc/src/lib/graphics/render2D/render_2d.cc	(revision 5381)
@@ -14,7 +14,8 @@
 */
 
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS
 
 #include "render_2d.h"
+#include "debug.h"
 
 #include "graphics_engine.h"
@@ -88,4 +89,12 @@
 void Render2D::moveToLayer(Element2D* element2D, E2D_LAYER to)
 {
+  // prevent switching Layers if either Render2D is not Instanciated or element2D is NULL
+  if (unlikely(element2D == NULL  || this == NULL))
+    return;
+  if(to > pow(2, E2D_LAYER_COUNT))
+  {
+    PRINTF(2)("trying to %s (%s) move to a to non-existing layer %d\n", element2D->getName(), element2D->getClassName() );
+    to = E2D_DEFAULT_LAYER;
+  }
   if (element2D->getLayer() != to)
   {
Index: branches/2d-recalc/src/lib/graphics/render2D/render_2d.h
===================================================================
--- branches/2d-recalc/src/lib/graphics/render2D/render_2d.h	(revision 5380)
+++ branches/2d-recalc/src/lib/graphics/render2D/render_2d.h	(revision 5381)
@@ -3,5 +3,5 @@
  * @brief Definition of the 2D-rendering engine singleton Class
  * @todo implement Layer-rendering
-*/
+ */
 
 #ifndef _RENDER_2D_H
Index: branches/2d-recalc/src/lib/shell/shell.cc
===================================================================
--- branches/2d-recalc/src/lib/shell/shell.cc	(revision 5380)
+++ branches/2d-recalc/src/lib/shell/shell.cc	(revision 5381)
@@ -57,4 +57,5 @@
     ->defaultValues(1, SHELL_DEFAULT_FONT);
 
+
 /**
  * standard constructor
@@ -81,6 +82,6 @@
   this->backgroundMaterial = new Material;
   // Element2D and generals
-  this->textSize = .001;
-  this->lineSpacing = .001;
+  this->textSize = 16;
+  this->lineSpacing = 1;
   this->bActive = false;
   this->fontFile = new char[strlen(SHELL_DEFAULT_FONT)+1];
@@ -96,4 +97,5 @@
   ShellBuffer::getInstance()->registerShell(this);
 }
+
 
 /**
@@ -115,4 +117,5 @@
 }
 
+
 /**
  * activates the shell
@@ -139,4 +142,5 @@
 }
 
+
 /**
  * deactiveates the Shell.
@@ -162,4 +166,5 @@
   this->bufferOffset = 0;
 }
+
 
 /**
@@ -183,4 +188,5 @@
   this->rebuildText();
 }
+
 
 /**
@@ -199,4 +205,5 @@
 }
 
+
 /**
  * sets the color of the Font.
@@ -229,4 +236,5 @@
   this->backgroundMaterial->setTransparency(a);
 }
+
 
 /**
@@ -271,4 +279,5 @@
 }
 
+
 /**
  * rebuilds the Text's
@@ -285,4 +294,5 @@
   this->setBufferDisplaySize(this->bufferDisplaySize);
 }
+
 
 /**
@@ -319,4 +329,5 @@
 }
 
+
 /**
  * deletes all the Buffers
@@ -334,4 +345,5 @@
     // BUFFER FLUSHING
 }
+
 
 /**
@@ -374,4 +386,5 @@
 }
 
+
 /**
  * moves the Display buffer (up or down)
@@ -424,4 +437,5 @@
 }
 
+
 /**
  * clears the Shell (empties all buffers)
@@ -432,4 +446,5 @@
   ShellBuffer::addBufferLineStatic("orxonox - shell\n ==================== \n", NULL);
 }
+
 
 /**
@@ -459,4 +474,5 @@
 }
 
+
 /**
  * displays the Shell
@@ -487,8 +503,8 @@
 }
 
+
 ///////////////////////
 // HELPER FUNCTIONS  //
 ///////////////////////
-
 /**
  * calculates the position of a Buffer-Display Line
@@ -500,5 +516,4 @@
   return Vector(5, (this->textSize + this->lineSpacing)*(this->bufferDisplaySize - lineNumber -1) + this->textSize, 0);
 }
-
 
 
Index: branches/2d-recalc/src/world_entities/weapons/crosshair.cc
===================================================================
--- branches/2d-recalc/src/world_entities/weapons/crosshair.cc	(revision 5380)
+++ branches/2d-recalc/src/world_entities/weapons/crosshair.cc	(revision 5381)
@@ -65,7 +65,7 @@
   this->setLayer(E2D_TOP);
   this->setRotationSpeed(5);
-  this->setSize(GraphicsEngine::getInstance()->getResolutionX()/10.0);
+  this->setSize(0.1);
 
-  this->setBindNode(this);
+//  this->setBindNode(this);
   this->material = new Material;
 
@@ -73,5 +73,5 @@
 
   // center the mouse on the screen, and also hide the cursors
-  SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2);
+//  SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2);
   GraphicsEngine::showMouse(false);
   GraphicsEngine::stealWMEvents(true);
@@ -121,5 +121,5 @@
   if  (event.type == EV_MOUSE_MOTION)
   {
-    this->setAbsCoor2D(event.x, event.y);
+    this->setAbsCoor2Dpx(event.x, event.y);
   }
 }
@@ -134,8 +134,7 @@
   this->shiftDir2D(dt * rotationSpeed);
 
-
   float z = 0.0f;
-  glReadPixels ((int)this->getAbsCoor2D().x,
-                 GraphicsEngine::getInstance()->getResolutionY()-(int)this->getAbsCoor2D().y-1,
+  glReadPixels ((int)this->getAbsCoor2Dpx().x,
+                 GraphicsEngine::getInstance()->getResolutionY()-(int)this->getAbsCoor2Dpx().y-1,
                  1,
                  1,
@@ -146,6 +145,6 @@
 
   GLdouble objX=.0, objY=.0, objZ=.0;
-  gluUnProject(this->getAbsCoor2D().x,
-               GraphicsEngine::getInstance()->getResolutionY()-this->getAbsCoor2D().y-1,
+  gluUnProject(this->getAbsCoor2Dpx().x,
+               GraphicsEngine::getInstance()->getResolutionY()-this->getAbsCoor2Dpx().y-1,
                .99,  // z
                GraphicsEngine::modMat,
@@ -166,4 +165,5 @@
   glPushMatrix();
   glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0);
+//  printf("%f, %f\n", this->getAbsCoor2D().x, this->getAbsCoor2D().y);
 
   glRotatef(this->getAbsDir2D(), 0,0,1);
Index: branches/2d-recalc/src/world_entities/weapons/weapon_manager.cc
===================================================================
--- branches/2d-recalc/src/world_entities/weapons/weapon_manager.cc	(revision 5380)
+++ branches/2d-recalc/src/world_entities/weapons/weapon_manager.cc	(revision 5381)
@@ -106,7 +106,7 @@
   this->crossHairSizeAnim = new tAnimation<Crosshair>(this->crosshair, &Crosshair::setSize);
   this->crossHairSizeAnim->setInfinity(ANIM_INF_REWIND);
-  this->crossHairSizeAnim->addKeyFrame(50, .1, ANIM_LINEAR);
-  this->crossHairSizeAnim->addKeyFrame(100, .05, ANIM_LINEAR);
-  this->crossHairSizeAnim->addKeyFrame(50, .01, ANIM_LINEAR);
+  this->crossHairSizeAnim->addKeyFrame(.1, .1, ANIM_LINEAR);
+  this->crossHairSizeAnim->addKeyFrame(.2, .05, ANIM_LINEAR);
+  this->crossHairSizeAnim->addKeyFrame(.1, .01, ANIM_LINEAR);
 }
 
