Index: /trunk/orxonox.kdevelop
===================================================================
--- /trunk/orxonox.kdevelop	(revision 5088)
+++ /trunk/orxonox.kdevelop	(revision 5089)
@@ -10,9 +10,9 @@
     <projectdirectory>.</projectdirectory>
     <absoluteprojectpath>false</absoluteprojectpath>
-    <description/>
+    <description></description>
     <secondaryLanguages>
       <language>C</language>
     </secondaryLanguages>
-    <versioncontrol/>
+    <versioncontrol></versioncontrol>
   </general>
   <kdevcustomproject>
@@ -21,5 +21,5 @@
       <directoryradio>build</directoryradio>
       <customdirectory>/</customdirectory>
-      <programargs/>
+      <programargs></programargs>
       <terminal>false</terminal>
       <autocompile>true</autocompile>
@@ -28,5 +28,5 @@
     <build>
       <buildtool>make</buildtool>
-      <builddir/>
+      <builddir></builddir>
     </build>
     <make>
@@ -35,21 +35,21 @@
       <prio>0</prio>
       <dontact>false</dontact>
-      <makebin/>
-      <makeoptions/>
+      <makebin></makebin>
+      <makeoptions></makeoptions>
       <selectedenvironment>default</selectedenvironment>
       <environments>
         <default/>
       </environments>
-      <defaulttarget/>
+      <defaulttarget></defaulttarget>
     </make>
   </kdevcustomproject>
   <kdevdebugger>
     <general>
-      <dbgshell/>
-      <programargs/>
-      <gdbpath/>
-      <configGdbScript/>
-      <runShellScript/>
-      <runGdbScript/>
+      <dbgshell></dbgshell>
+      <programargs></programargs>
+      <gdbpath></gdbpath>
+      <configGdbScript></configGdbScript>
+      <runShellScript></runShellScript>
+      <runGdbScript></runGdbScript>
       <breakonloadinglibs>true</breakonloadinglibs>
       <separatetty>false</separatetty>
@@ -131,5 +131,5 @@
     </codecompletion>
     <creategettersetter>
-      <prefixGet/>
+      <prefixGet></prefixGet>
       <prefixSet>set</prefixSet>
       <prefixVariable>m_,_</prefixVariable>
@@ -157,7 +157,7 @@
   <kdevdocumentation>
     <projectdoc>
-      <docsystem/>
-      <docurl/>
-      <usermanualurl/>
+      <docsystem></docsystem>
+      <docurl></docurl>
+      <usermanualurl></usermanualurl>
     </projectdoc>
   </kdevdocumentation>
Index: /trunk/src/lib/coord/p_node.cc
===================================================================
--- /trunk/src/lib/coord/p_node.cc	(revision 5088)
+++ /trunk/src/lib/coord/p_node.cc	(revision 5089)
@@ -95,5 +95,4 @@
   if (this->toDirection != NULL)
     delete this->toDirection;
-
 }
 
@@ -575,5 +574,5 @@
       }
 
-      if(likely(this->parentMode & PNODE_MOVEMENT))
+      if(likely(this->parentMode & PNODE_MOVEMENT && this->bRelCoorChanged))
       {
         /* update the current absCoordinate */
@@ -581,5 +580,5 @@
         this->absCoordinate = this->parent->getAbsCoor() + this->relCoordinate;
       }
-      else if( this->parentMode & PNODE_ROTATE_MOVEMENT)
+      else if( this->parentMode & PNODE_ROTATE_MOVEMENT && this->bRelCoorChanged)
       {
         /* update the current absCoordinate */
Index: /trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- /trunk/src/lib/graphics/graphics_engine.cc	(revision 5088)
+++ /trunk/src/lib/graphics/graphics_engine.cc	(revision 5089)
@@ -410,5 +410,5 @@
 void GraphicsEngine::update(float dt)
 {
-//  NullElement2D::getInstance()->update2D(dt);
+  NullElement2D::getInstance()->update2D(dt);
   NullElement2D::getInstance()->debug(0);
 
@@ -468,5 +468,5 @@
   this->geTextCFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
   this->geTextCFPS->setAlignment(TEXT_ALIGN_LEFT);
-  this->geTextCFPS->setPosition2D(5, 5);
+  this->geTextCFPS->setAbsCoor2D(5, 5);
 }
 if (this->geTextMaxFPS == NULL)
@@ -474,5 +474,5 @@
       this->geTextMaxFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
       this->geTextMaxFPS->setAlignment(TEXT_ALIGN_LEFT);
-      this->geTextMaxFPS->setPosition2D(5, 35);
+      this->geTextMaxFPS->setAbsCoor2D(5, 35);
 }
 if (this->geTextMinFPS == NULL)
@@ -480,5 +480,5 @@
       this->geTextMinFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
       this->geTextMinFPS->setAlignment(TEXT_ALIGN_LEFT);
-      this->geTextMinFPS->setPosition2D(5, 65);
+      this->geTextMinFPS->setAbsCoor2D(5, 65);
 }
 #endif /* NO_TEXT */
Index: /trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- /trunk/src/lib/graphics/render2D/element_2d.cc	(revision 5088)
+++ /trunk/src/lib/graphics/render2D/element_2d.cc	(revision 5089)
@@ -28,4 +28,9 @@
 using namespace std;
 
+Element2D::Element2D()
+{
+  this->init();
+  this->setParent2D(NullElement2D::getInstance());
+}
 
 /**
@@ -35,5 +40,8 @@
 Element2D::Element2D (Element2D* parent)
 {
-  this->init(parent);
+  this->init();
+
+  if (this->parent != NULL)
+    this->setParent2D(parent);
 }
 
@@ -45,4 +53,17 @@
   // delete what has to be deleted here
   Render2D::getInstance()->unregisterElement2D(this);
+
+  tIterator<Element2D>* iterator = this->children->getIterator();
+  Element2D* pn = iterator->nextElement();
+  while( pn != NULL)
+  {
+    delete pn;
+    pn = iterator->nextElement();
+  }
+  delete iterator;
+  /* this deletes all children in the list */
+  delete this->children;
+  if (this->parent)
+    this->parent->removeChild2D(this);
 
   if (this->toCoordinate != NULL)
@@ -56,5 +77,5 @@
  * initializes a Element2D
  */
-void Element2D::init(Element2D* parent)
+void Element2D::init()
 {
   this->setClassID(CL_ELEMENT_2D, "Element2D");
@@ -62,16 +83,16 @@
   this->setVisibility(true);
   this->setActiveness(true);
-  this->setPosition2D(0,0);
   this->setAlignment(E2D_ALIGN_NONE);
   this->layer = E2D_TOP;
+  this->bindNode = NULL;
 
   this->setParentMode2D(E2D_PARENT_ALL);
+  this->parent = NULL;
   this->children = new tList<Element2D>;
+  this->relDirection = 0.0;
   this->bRelCoorChanged = true;
   this->bRelDirChanged = true;
   this->toCoordinate = NULL;
   this->toDirection = NULL;
-  if (parent == NULL)
-    this->parent = NULL;
 //  else
   //  this->setParent2D(parent);
@@ -95,9 +116,10 @@
       .describe("sets a node, this 2D-Element should be shown upon (name of the node)");
 
-  LoadParam<Element2D>(root, "2d-position", this, &Element2D::setPosition2D)
-      .describe("the _relative_ position (away from alignment) this 2d-element shows");
-
   LoadParam<Element2D>(root, "visibility", this, &Element2D::setVisibility)
       .describe("if the Element is visible or not");
+
+//   LoadParam<Element2D>(root, "2d-position", this, &Element2D::setPosition2D)
+//       .describe("the _relative_ position (away from alignment) this 2d-element shows");
+
 }
 
@@ -157,43 +179,4 @@
 }
 
-/**
- * this sets the position of the Element on the screen.
- * Use this in the your tick function, if you want the element to be automatically positioned.
- *
- * @todo must be in update
- */
-void Element2D::positioning()
-{
-  // setting the Position of this 2D-Element.
-  if (this->alignment == E2D_ALIGN_SCREEN_CENTER)
-  {
-    absPos2D.x = GraphicsEngine::getInstance()->getResolutionX()/2 + this->relPos2D[0];
-    absPos2D.y = GraphicsEngine::getInstance()->getResolutionY()/2 + this->relPos2D[1];
-    absPos2D.depth = 0;
-  }
-  else if (this->bindNode)
-  {
-    GLdouble projectPos[3];
-    gluProject(this->bindNode->getAbsCoor().x,
-               this->bindNode->getAbsCoor().y,
-               this->bindNode->getAbsCoor().z,
-               GraphicsEngine::modMat,
-               GraphicsEngine::projMat,
-               GraphicsEngine::viewPort,
-               projectPos,
-               projectPos+1,
-               projectPos+2);
-    absPos2D.x = projectPos[0] + this->relPos2D[0];
-    absPos2D.y = GraphicsEngine::getInstance()->getResolutionY() - projectPos[1] + this->relPos2D[1];
-    absPos2D.depth = projectPos[2];
-  }
-  else
-  {
-    absPos2D.x = this->relPos2D[0];
-    absPos2D.y = this->relPos2D[1];
-    absPos2D.depth = 0;
-  }
-}
-
 
 void Element2D::setRelCoor2D (const Vector& relCoord)
@@ -209,4 +192,13 @@
 }
 
+void Element2D::setRelCoor2Dpx (int x, int y)
+{
+  this->setRelCoor2D(Vector((float)GraphicsEngine::getInstance()->getResolutionX()/(float)x,
+                     (float)GraphicsEngine::getInstance()->getResolutionY()/(float)y,
+                     0
+                           ));
+}
+
+
 void Element2D::setRelCoorSoft2D(const Vector& relCoordSoft, float bias)
 {
@@ -217,4 +209,13 @@
   this->bias = bias;
 }
+
+void Element2D::setRelCoorSoft2Dpx (int x, int y, float bias)
+{
+  this->setRelCoorSoft2D(Vector((float)GraphicsEngine::getInstance()->getResolutionX()/(float)x,
+                         (float)GraphicsEngine::getInstance()->getResolutionY()/(float)y,
+                         0),
+                         bias);
+}
+
 
 void Element2D::setRelCoorSoft2D(float x, float y, float depth, float bias)
@@ -249,4 +250,13 @@
 }
 
+
+void Element2D::setAbsCoor2Dpx (int x, int y)
+{
+  this->setAbsCoor2D(Vector((float)GraphicsEngine::getInstance()->getResolutionX()/(float)x,
+                     (float)GraphicsEngine::getInstance()->getResolutionY()/(float)y,
+                     0
+                           ));
+}
+
 void Element2D::shiftCoor2D (const Vector& shift)
 {
@@ -254,4 +264,12 @@
   this->bRelCoorChanged = true;
 
+}
+
+
+void Element2D::shiftCoor2Dpx (int x, int y)
+{
+  this->shiftCoor2D(Vector((float)GraphicsEngine::getInstance()->getResolutionX()/(float)x,
+                     (float)GraphicsEngine::getInstance()->getResolutionY()/(float)y,
+                     0));
 }
 
@@ -392,4 +410,5 @@
 void Element2D::update2D (float dt)
 {
+  // setting the Position of this 2D-Element.
   if( likely(this->parent != NULL))
   {
@@ -438,17 +457,44 @@
     }
 
-    if(likely(this->parentMode & PNODE_MOVEMENT))
-    {
-      /* update the current absCoordinate */
+
+    if (this->alignment == E2D_ALIGN_SCREEN_CENTER && this->bRelCoorChanged)
+    {
       this->prevRelCoordinate = this->relCoordinate;
-      this->absCoordinate = this->parent->getAbsCoor2D() + this->relCoordinate;
-    }
-    else if( this->parentMode & PNODE_ROTATE_MOVEMENT)
-    {
-      /* update the current absCoordinate */
-      this->prevRelCoordinate = this->relCoordinate;
-      this->absCoordinate.x = this->parent->getAbsCoor2D().x + (this->relCoordinate.x*cos(this->parent->getAbsDir2D()) - this->relCoordinate.y * sin(this->parent->getAbsDir2D()));
-      this->absCoordinate.y = this->parent->getAbsCoor2D().y + (this->relCoordinate.x*sin(this->parent->getAbsDir2D()) + this->relCoordinate.y * cos(this->parent->getAbsDir2D()));
-
+      this->absCoordinate.x = .5 + this->relCoordinate.x;
+      this->absCoordinate.y = .5 + this->relCoordinate.y;
+      this->absCoordinate.z = 0.0;
+    }
+    else if (this->bindNode)
+    {
+      GLdouble projectPos[3];
+      gluProject(this->bindNode->getAbsCoor().x,
+                 this->bindNode->getAbsCoor().y,
+                 this->bindNode->getAbsCoor().z,
+                 GraphicsEngine::modMat,
+                 GraphicsEngine::projMat,
+                 GraphicsEngine::viewPort,
+                 projectPos,
+                 projectPos+1,
+                 projectPos+2);
+      this->absCoordinate.x = projectPos[0]/(float)GraphicsEngine::getInstance()->getResolutionX() + this->relCoordinate.x;
+      this->absCoordinate.y = projectPos[1]/(float)GraphicsEngine::getInstance()->getResolutionY() + this->relCoordinate.y;
+      this->absCoordinate.z = projectPos[2] + this->relCoordinate.z;
+    }
+    else
+    {
+      if(likely(this->parentMode & PNODE_MOVEMENT && this->bRelCoorChanged))
+      {
+        /* update the current absCoordinate */
+        this->prevRelCoordinate = this->relCoordinate;
+        this->absCoordinate = this->parent->getAbsCoor2D() + this->relCoordinate;
+      }
+      else if( this->parentMode & PNODE_ROTATE_MOVEMENT && this->bRelCoorChanged)
+      {
+        /* update the current absCoordinate */
+        this->prevRelCoordinate = this->relCoordinate;
+        this->absCoordinate.x = this->parent->getAbsCoor2D().x + (this->relCoordinate.x*cos(this->parent->getAbsDir2D()) - this->relCoordinate.y * sin(this->parent->getAbsDir2D()));
+        this->absCoordinate.y = this->parent->getAbsCoor2D().y + (this->relCoordinate.x*sin(this->parent->getAbsDir2D()) + this->relCoordinate.y * cos(this->parent->getAbsDir2D()));
+
+      }
     }
     /////////////////////////////////////////////////
@@ -463,4 +509,6 @@
   }
 
+
+  // UPDATE CHILDREN
   if(this->children->getSize() > 0)
   {
@@ -481,4 +529,6 @@
     delete iterator;
   }
+
+  // FINISHING PROCESS
   this->velocity = (this->absCoordinate - this->lastAbsCoordinate) / dt;
   this->bRelCoorChanged = false;
@@ -569,5 +619,5 @@
 void Element2D::tick(float dt)
 {
-  this->positioning();
+
 }
 
@@ -584,5 +634,5 @@
  * @param absCoordinate the cordinate of the Parent (normally Vector(0,0,0))
  */
-NullElement2D::NullElement2D ()
+NullElement2D::NullElement2D () : Element2D(NULL)
 {
   this->setClassID(CL_NULL_PARENT, "NullElement2D");
Index: /trunk/src/lib/graphics/render2D/element_2d.h
===================================================================
--- /trunk/src/lib/graphics/render2D/element_2d.h	(revision 5088)
+++ /trunk/src/lib/graphics/render2D/element_2d.h	(revision 5089)
@@ -10,4 +10,5 @@
 
 #include "base_object.h"
+
 #include "vector.h"
 
@@ -63,18 +64,15 @@
 
   public:
-    Element2D(Element2D* parent = NULL);
+    Element2D();
+    Element2D(Element2D* parent);
     virtual ~Element2D();
 
-    void init(Element2D* parent = NULL);
+    void init();
     void loadParams(const TiXmlElement* root);
-
-    /** @param xCoord the xCoordinate @param yCoord the y-Coordinate. These coordinates are Relative */
-    inline void setPosition2D(int xCoord, int yCoord) { this->relPos2D[0] = xCoord; this->relPos2D[1] = yCoord; };
-    /** 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);
+    inline E2D_ALIGNMENT getAlignment() const { return this->alignment; };
 
     void setLayer(E2D_LAYER layer);
@@ -92,4 +90,5 @@
     inline void setBindNode(const PNode* bindNode) { this->bindNode = bindNode; };
     void setBindNode(const char* bindNode);
+    inline const PNode* getBindNode() const { return this->bindNode; };
 
     /** @returns the visibility state */
@@ -102,14 +101,21 @@
   public:
     void setRelCoor2D (const Vector& relCoord);
-    void setRelCoor2D (float x, float y, float dontCare);
-    void setRelCoorSoft2D(const Vector& relCoordSoft, float bias = 1.0);
-    void setRelCoorSoft2D(float x, float y, float dontCare, float bias = 1.0);
+    void setRelCoor2D (float x, float y, float dontCare = 1.0);
+    void setRelCoor2Dpx (int x, int y);
+    void setRelCoorSoft2D (const Vector& relCoordSoft, float bias = 1.0);
+    void setRelCoorSoft2D (float x, float y, float dontCare = 1.0, float bias = 1.0);
+    void setRelCoorSoft2Dpx (int x, int y, float bias = 1.0);
     /** @returns the relative position */
     inline const Vector& getRelCoor2D () const { return this->prevRelCoordinate; };
+    const Vector& getRelCoor2Dpx() const;
     void setAbsCoor2D (const Vector& absCoord);
-    void setAbsCoor2D (float x, float y, float depth);
+    void setAbsCoor2D (float x, float y, float depth = 1.0);
+    void setAbsCoor2Dpx (int x, int y);
     /** @returns the absolute position */
     inline const Vector& getAbsCoor2D () const { return this->absCoordinate; };
+    const Vector& getAbsCoor2Dpx () const;
+
     void shiftCoor2D (const Vector& shift);
+    void shiftCoor2Dpx (int x, int y);
 
     void setRelDir2D (float relDir);
@@ -168,45 +174,36 @@
     virtual void draw() const = NULL;
 
-  protected:
-    void positioning();
-    //void Element2D(NullElement2D* nullElem);
-
-  protected:
-    const PNode*            bindNode;         //!< a node over which to display this 2D-element
-    int                     relPos2D[2];      //!< X-coord, Y-Coord (relative to the Coordinates of the alignment if given.)
-    Position2D              absPos2D;         //!< The absolute position of the 2D-Element.
-
-    E2D_ALIGNMENT           alignment;        //!< How the Element is aligned around its Position
-
-  private:
-    bool                    visible;          //!< If the given Element2D is visible.
-    bool                    active;           //!< If the given Element2D is active.
-    E2D_LAYER               layer;            //!< What layer this Element2D is on.
-
-
-  private:
-    bool              bRelCoorChanged;    //!< If Relative Coordinate has changed since last time we checked
-    bool              bRelDirChanged;     //!< If Relative Direction has changed since last time we checked
-
-    Vector            relCoordinate;      //!< coordinates relative to the parent
-    Vector            absCoordinate;      //!< absolute coordinates in the world ( from (0,0,0) )
-    float             relDirection;       //!< direction relative to the parent
-    float             absDirection;       //!< absolute direvtion in the world ( from (0,0,1) )
-
-    Vector            prevRelCoordinate;  //!< The last Relative Coordinate from the last update-Cycle.
-    Vector            lastAbsCoordinate;  //!< this is used for speedcalculation, it stores the last coordinate
-    float             prevRelDirection;   //!< The last Relative Direciton from the last update-Cycle.
-//  Quaternion        lastAbsDirection;
-
-    Vector            velocity;           //!< Saves the velocity.
-
-    Vector*           toCoordinate;       //!< a position to which to iterate. (This is used in conjunction with softReparent.and set*CoorSoft)
-    float*            toDirection;        //!< a direction to which to iterate. (This is used in conjunction with softReparent and set*DirSoft)
-    float             bias;               //!< how fast to iterate to the given position (default is 1)
-
-    Element2D*        parent;             //!< a pointer to the parent node
-    tList<Element2D>* children;           //!< list of the children of this Element2D
-
-    unsigned int      parentMode;         //!< the mode of the binding
+  private:
+    const PNode*            bindNode;           //!< a node over which to display this 2D-element
+
+    E2D_ALIGNMENT           alignment;          //!< How the Element is aligned around its Position
+
+    bool                    visible;            //!< If the given Element2D is visible.
+    bool                    active;             //!< If the given Element2D is active.
+    E2D_LAYER               layer;              //!< What layer this Element2D is on.
+
+    bool                    bRelCoorChanged;    //!< If Relative Coordinate has changed since last time we checked
+    bool                    bRelDirChanged;     //!< If Relative Direction has changed since last time we checked
+
+    Vector                  relCoordinate;      //!< coordinates relative to the parent
+    Vector                  absCoordinate;      //!< absolute coordinates in the world ( from (0,0,0) )
+    float                   relDirection;       //!< direction relative to the parent
+    float                   absDirection;       //!< absolute direvtion in the world ( from (0,0,1) )
+
+    Vector                  prevRelCoordinate;  //!< The last Relative Coordinate from the last update-Cycle.
+    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.
+
+    Vector*                 toCoordinate;       //!< a position to which to iterate. (This is used in conjunction with softReparent.and set*CoorSoft)
+    float*                  toDirection;        //!< a direction to which to iterate. (This is used in conjunction with softReparent and set*DirSoft)
+    float                   bias;               //!< how fast to iterate to the given position (default is 1)
+
+    Element2D*              parent;             //!< a pointer to the parent node
+    tList<Element2D>*       children;           //!< list of the children of this Element2D
+
+    unsigned int            parentMode;         //!< the mode of the binding
 };
 
Index: /trunk/src/lib/graphics/text_engine.cc
===================================================================
--- /trunk/src/lib/graphics/text_engine.cc	(revision 5088)
+++ /trunk/src/lib/graphics/text_engine.cc	(revision 5089)
@@ -55,8 +55,7 @@
 
   // initialize this Text
-  this->bindNode = NULL;
   this->font = font;
   this->text = NULL;
-  this->alignment = TEXT_DEFAULT_ALIGNMENT;
+  this->setAlignment(TEXT_DEFAULT_ALIGNMENT);
   this->texture = 0;
   this->blending = 1.0f;
@@ -112,5 +111,5 @@
 
   // setting up the Text-Width if DYNAMIC
-  if (this->type == TEXT_DYNAMIC && this->alignment != TEXT_ALIGN_LEFT)
+  if (this->type == TEXT_DYNAMIC && this->getAlignment() != TEXT_ALIGN_LEFT)
     {
       Glyph** glyphArray = this->font->getGlyphArray();
@@ -173,7 +172,7 @@
   glPushMatrix();
   // transform for alignment.
-  if (this->alignment == TEXT_ALIGN_RIGHT)
+  if (this->getAlignment() == TEXT_ALIGN_RIGHT)
     glTranslatef(-this->posSize.w, 0, 0);
-  else if (this->alignment == TEXT_ALIGN_CENTER || this->alignment == TEXT_ALIGN_SCREEN_CENTER)
+  else if (this->getAlignment() == TEXT_ALIGN_CENTER || this->getAlignment() == TEXT_ALIGN_SCREEN_CENTER)
     glTranslatef(-this->posSize.w/2, 0, 0);
 
@@ -191,14 +190,14 @@
 
       glTexCoord2f(this->texCoord.minU, this->texCoord.minV);
-      glVertex2f(this->absPos2D.x,   this->absPos2D.y  );
+      glVertex2f(this->getAbsCoor2D().x,   this->getAbsCoor2D().y  );
 
       glTexCoord2f(this->texCoord.maxU, this->texCoord.minV);
-      glVertex2f(this->absPos2D.x + this->posSize.w, this->absPos2D.y  );
+      glVertex2f(this->getAbsCoor2D().x + this->posSize.w, this->getAbsCoor2D().y  );
 
       glTexCoord2f(this->texCoord.maxU, this->texCoord.maxV);
-      glVertex2f(this->absPos2D.x + this->posSize.w, absPos2D.y + this->posSize.h);
+      glVertex2f(this->getAbsCoor2D().x + this->posSize.w, getAbsCoor2D().y + this->posSize.h);
 
       glTexCoord2f(this->texCoord.minU, this->texCoord.maxV);
-      glVertex2f(absPos2D.x, absPos2D.y + this->posSize.h);
+      glVertex2f(getAbsCoor2D().x, getAbsCoor2D().y + this->posSize.h);
 
       glEnd();
@@ -209,5 +208,5 @@
       glBindTexture(GL_TEXTURE_2D, this->font->getFastTextureID());
       //      glEnable(GL_TEXTURE_2D);
-      glTranslatef(absPos2D.x, absPos2D.y, 0);
+      glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
 
       const char* tmpText = this->text;
@@ -231,6 +230,6 @@
 {
   PRINT(0)("=== TEXT: %s ===\n", this->text);
-  if (this->bindNode)
-    PRINT(0)("is bind to %s; ref=%p\n", this->bindNode->getName(), this->bindNode);
+  if (this->getBindNode())
+    PRINT(0)("is bind to %s; ref=%p\n", this->getBindNode()->getName(), this->getBindNode());
   PRINT(0)("Relative Position: (%d::%d)\n", this->posSize.x, this->posSize.y);
   PRINT(0)("Color: %d %d %d\n", this->color.r, this->color.g, this->color.b);
Index: /trunk/src/util/shell.cc
===================================================================
--- /trunk/src/util/shell.cc	(revision 5088)
+++ /trunk/src/util/shell.cc	(revision 5089)
@@ -46,8 +46,4 @@
   this->inputLineText = TextEngine::getInstance()->createText("fonts/earth.ttf", 10, TEXT_DYNAMIC, 255, 0, 0);
   this->inputLineText->setText(NULL);
-
-  //this->addBufferLineStatic("asjflksjdvklasmv %s", "doom");
-  //TextEngine::getInstance()->debug();
-  //exit(-1);
 }
 
@@ -65,4 +61,5 @@
   delete this->inputLineText;
 
+
   Shell::singletonRef = NULL;
 }
@@ -86,6 +83,7 @@
     this->bufferText[i] = TextEngine::getInstance()->createText("fonts/earth.ttf", this->textSize, TEXT_DYNAMIC, 255, 0, 0);
     this->bufferText[i]->setAlignment(TEXT_ALIGN_LEFT);
-    this->bufferText[i]->setPosition2D(5, 400 + 12*i);
+    this->bufferText[i]->setRelCoor2D(5, 400 + 12*i);
     this->bufferText[i]->setText(NULL);
+    this->bufferText[i]->setParent2D(this);
   }
 
@@ -132,7 +130,12 @@
   va_start(arguments, line);
 
+#if DEBUG > 3
   if (Shell::singletonRef == NULL)
-   vprintf(line, arguments);
+#endif
+
+  vprintf(line, arguments);
+#if DEBUG > 3
   else
+#endif
     Shell::singletonRef->addBufferLine(line, arguments);
   return true;
