Index: /trunk/src/lib/coord/p_node.cc
===================================================================
--- /trunk/src/lib/coord/p_node.cc	(revision 5419)
+++ /trunk/src/lib/coord/p_node.cc	(revision 5420)
@@ -36,5 +36,5 @@
 /**
  *  standard constructor
-*/
+ */
 PNode::PNode ()
 {
@@ -46,5 +46,5 @@
 /**
  * @param root the load-Element for the PNode
-*/
+ */
 PNode::PNode(const TiXmlElement* root)
 {
@@ -60,5 +60,5 @@
  * @param absCoordinate the Absolute coordinate of the Object
  * @param parent The parent-node of this node.
-*/
+ */
 PNode::PNode (const Vector& absCoor, PNode* parent )
 {
@@ -116,5 +116,5 @@
  *  initializes a PNode
  * @param parent the parent for this PNode
-*/
+ */
 void PNode::init(PNode* parent)
 {
@@ -136,5 +136,5 @@
  *  loads parameters of the PNode
  * @param root the XML-element to load the properties of
-*/
+ */
 void PNode::loadParams(const TiXmlElement* root)
 {
@@ -176,9 +176,10 @@
  *  set relative coordinates
  * @param relCoord relative coordinates to its parent
-
-   it is very importand, that you use this function, if you want to update the
-   relCoordinates. If you don't use this, the PNode won't recognize, that something
-   has changed and won't update the children Nodes.
-*/
+ *
+ *
+ * it is very importand, that you use this function, if you want to update the
+ * relCoordinates. If you don't use this, the PNode won't recognize, that something
+ * has changed and won't update the children Nodes.
+ */
 void PNode::setRelCoor (const Vector& relCoord)
 {
@@ -199,5 +200,5 @@
  * @param z z-relative coordinates to its parent
  * @see  void PNode::setRelCoor (const Vector& relCoord)
-*/
+ */
 void PNode::setRelCoor (float x, float y, float z)
 {
@@ -306,17 +307,17 @@
  *  shift coordinate relative
  * @param shift shift vector
-
-   this function shifts the current coordinates about the vector shift. this is
-   usefull because from some place else you can:
-   PNode* someNode = ...;
-   Vector objectMovement = calculateShift();
-   someNode->shiftCoor(objectMovement);
-
-   otherwise you would have to:
-   PNode* someNode = ...;
-   Vector objectMovement = calculateShift();
-   Vector currentCoor = someNode->getRelCoor();
-   Vector newCoor = currentCoor + objectMovement;
-   someNode->setRelCoor(newCoor);
+ *
+ * this function shifts the current coordinates about the vector shift. this is
+ * usefull because from some place else you can:
+ * PNode* someNode = ...;
+ * Vector objectMovement = calculateShift();
+ * someNode->shiftCoor(objectMovement);
+ *
+ * this is the internal method of:
+ * PNode* someNode = ...;
+ * Vector objectMovement = calculateShift();
+ * Vector currentCoor = someNode->getRelCoor();
+ * Vector newCoor = currentCoor + objectMovement;
+ * someNode->setRelCoor(newCoor);
  *
  */
@@ -417,5 +418,5 @@
 
 /**
- *  sets the absolute direction
+ * sets the absolute direction
  * @param absDir absolute coordinates
  */
@@ -461,5 +462,5 @@
  * @param child child reference
  * use this to add a child to this node.
-*/
+ */
 void PNode::addChild (PNode* child)
 {
@@ -491,5 +492,5 @@
  *
  * Children from pNode will not be lost, they are referenced to NullPointer
-*/
+ */
 void PNode::removeChild (PNode* child)
 {
@@ -504,7 +505,7 @@
 /**
  *  remove this pnode from the tree and adds all following to NullParent
-
-   this can be the case, if an entity in the world is being destroyed.
-*/
+ *
+ * this can be the case, if an entity in the world is being destroyed.
+ */
 void PNode::remove()
 {
@@ -525,5 +526,5 @@
  * sets the parent of this PNode
  * @param parent the Parent to set
-*/
+ */
 void PNode::setParent (PNode* parent)
 {
@@ -604,9 +605,9 @@
  *  updates the absCoordinate/absDirection
  * @param dt The time passed since the last update
-
-   this is used to go through the parent-tree to update all the absolute coordinates
-   and directions. this update should be done by the engine, so you don't have to
-   worry, normaly...
-*/
+ *
+ * this is used to go through the parent-tree to update all the absolute coordinates
+ * and directions. this update should be done by the engine, so you don't have to
+ * worry, normaly...
+ */
 void PNode::update (float dt)
 {
@@ -713,5 +714,5 @@
  * (0: all children will be debugged, 1: only this PNode, 2: this and direct children, ...)
  * @param level !! INTERNAL !! The n-th level of the Node we draw (this is internal and only for nice output).
-*/
+ */
 void PNode::debug(unsigned int depth, unsigned int level) const
 {
Index: /trunk/src/lib/graphics/render2D/render_2d.h
===================================================================
--- /trunk/src/lib/graphics/render2D/render_2d.h	(revision 5419)
+++ /trunk/src/lib/graphics/render2D/render_2d.h	(revision 5420)
@@ -2,6 +2,5 @@
  * @file render_2d.h
  * @brief Definition of the 2D-rendering engine singleton Class
- * @todo implement Layer-rendering
-*/
+ */
 
 #ifndef _RENDER_2D_H
Index: /trunk/src/lib/graphics/text_engine/font.cc
===================================================================
--- /trunk/src/lib/graphics/text_engine/font.cc	(revision 5419)
+++ /trunk/src/lib/graphics/text_engine/font.cc	(revision 5420)
@@ -412,5 +412,5 @@
 
   this->initGlyphs(32, numberOfGlyphs);
-  this->glyphArray[32]->width = .5f; //!< @todo find out the real size of a Space
+//  this->glyphArray[32]->width = .5f; //!< @todo find out the real size of a Space
 
   int rectSize = this->findOptimalFastTextureSize();
@@ -437,5 +437,5 @@
   tmpRect.x = 0; tmpRect.y = 0; tmpRect.w = tmpSurf->w; tmpRect.h = tmpSurf->h;
   SDL_SetClipRect(tmpSurf, &tmpRect);
-  int maxLineHeight = 0;
+  int maxLineHeight = this->getMaxHeight();
 
   // all the interessting Glyphs
@@ -453,6 +453,5 @@
       {
         tmpRect.x = 0;
-        tmpRect.y = tmpRect.y + maxLineHeight + 1;
-        maxLineHeight = 0;
+        tmpRect.y = tmpRect.y + maxLineHeight;
       }
       if (tmpRect.y + maxLineHeight > tmpSurf->h)
@@ -470,17 +469,19 @@
       {
         SDL_SetAlpha(glyphSurf, 0, 0);
-
+        int tmp = tmpRect.y;
+        tmpRect.y += this->getMaxAscent()-(int)((float)tmpGlyph->bearingY*this->renderSize);
         SDL_BlitSurface(glyphSurf, NULL, tmpSurf, &tmpRect);
-        tmpGlyph->texCoord[0] = (float)tmpRect.x/(float)tmpSurf->w;
-        tmpGlyph->texCoord[1] = (float)(tmpRect.x + tmpGlyph->advance*this->renderSize)/(float)tmpSurf->w;
+        tmpRect.y = tmp;
+
+        tmpGlyph->texCoord[0] = (float)(tmpRect.x)/(float)tmpSurf->w;
+        tmpGlyph->texCoord[1] = (float)(tmpRect.x + tmpGlyph->width*(float)this->renderSize)/(float)tmpSurf->w;
         tmpGlyph->texCoord[2] = (float)(tmpRect.y)/(float)tmpSurf->w;
-        tmpGlyph->texCoord[3] = (float)(tmpRect.y+tmpGlyph->height*this->renderSize)/(float)tmpSurf->w;
+        tmpGlyph->texCoord[3] = (float)(tmpRect.y+this->getMaxHeight())/(float)tmpSurf->w;
         SDL_FreeSurface(glyphSurf);
-
-        tmpRect.x += (int)(tmpGlyph->advance*this->renderSize)+1;
-
-              // Outputting Glyphs to BMP-files.
+        tmpRect.x += (int)(tmpGlyph->advance * this->renderSize)+1;
+
         /*
-        char outname[512];
+        // Outputting Glyphs to BMP-files.
+        char outname[1024];
         if (i < 10)
         sprintf( outname, "%s-glyph-00%d.bmp", this->getName(), i );
@@ -489,9 +490,12 @@
         else
         sprintf( outname, "%s-glyph-%d.bmp", this->getName(), i );
-        SDL_SaveBMP(tmpSurf, outname);
-        */
+        SDL_SaveBMP(tmpSurf, outname);*/
       }
     }
   }
+  // outputting the GLYPH-table
+  //   char outName[1024];
+  //   sprintf( outName, "%s-glyphs.bmp", this->getName());
+  //   SDL_SaveBMP(tmpSurf, outName);
 
   GLuint texture;
Index: /trunk/src/lib/graphics/text_engine/text.cc
===================================================================
--- /trunk/src/lib/graphics/text_engine/text.cc	(revision 5419)
+++ /trunk/src/lib/graphics/text_engine/text.cc	(revision 5420)
@@ -243,5 +243,5 @@
     {
       glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
-      glRotatef(this->getAbsDir2D(), 0,0,1);
+      glRotatef(this->getAbsDir2D(), 0, 0, 1);
       Glyph* tmpGlyph;
       float posX = 0.0f;
@@ -253,14 +253,14 @@
 
           glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[2]);
-          glVertex2d(posX, - tmpGlyph->bearingY * this->size);
+          glVertex2d(posX, 0);
 
           glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[3]);
-          glVertex2d(posX, (tmpGlyph->height - tmpGlyph->bearingY)*this->size);
+          glVertex2d(posX, this->size);
 
           glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[3]);
-          glVertex2d(posX+tmpGlyph->width*this->size, (tmpGlyph->height - tmpGlyph->bearingY)*this->size);
+          glVertex2d(posX+tmpGlyph->width*this->size, this->size);
 
           glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]);
-          glVertex2d(posX+tmpGlyph->width*this->size, - tmpGlyph->bearingY*this->size);
+          glVertex2d(posX+tmpGlyph->width*this->size, 0);
 
           glEnd();
Index: /trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc
===================================================================
--- /trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc	(revision 5419)
+++ /trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc	(revision 5420)
@@ -19,4 +19,5 @@
 
 #include "text.h"
+#include "material.h"
 
 using namespace std;
@@ -45,5 +46,10 @@
 {
   this->setClassID(CL_GLGUI_PUSHBUTTON, "GLGuiPushButton");
+//  this->label->setRelCoor2D(10, 10);
 
+  this->backMat = new Material();
+  this->backMat->setDiffuse(0, 0, 0);
+
+  this->setSize2D(label->getSizeX2D()+10, label->getSizeY2D()+10);
 }
 
@@ -53,5 +59,18 @@
 void GLGuiPushButton::draw() const
 {
-  this->label->draw();
+  this->backMat->select();
+  glPushMatrix();
+  glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0);
+  glBegin(GL_QUADS);
+
+  glVertex2d(0,0);
+  glVertex2d(0, this->getSizeY2D());
+  glVertex2d(this->getSizeX2D(), this->getSizeY2D());
+  glVertex2d(this->getSizeX2D(),0);
+
+  glEnd();
+  glPopMatrix();
+
+//   this->label->draw();
 //  printf("test");
 }
Index: /trunk/src/lib/math/vector.cc
===================================================================
--- /trunk/src/lib/math/vector.cc	(revision 5419)
+++ /trunk/src/lib/math/vector.cc	(revision 5420)
@@ -15,4 +15,6 @@
 
    Quaternion code borrowed from an Gamasutra article by Nick Bobick and Ken Shoemake
+
+   2005-06-02: Benjamin Grauer: speed up, and new Functionality to Vector (mostly inline now)
 */
 
@@ -30,5 +32,5 @@
  *  returns the this-vector normalized to length 1.0
  * @todo there is some error in this function, that i could not resolve. it just does not, what it is supposed to do.
-*/
+ */
 Vector Vector::getNormalized() const
 {
@@ -53,5 +55,5 @@
 /**
  *  Outputs the values of the Vector
-*/
+ */
 void Vector::debug() const
 {
@@ -77,5 +79,5 @@
  *
  * @TODO !!! OPTIMIZE THIS !!!
-*/
+ */
 Quaternion::Quaternion (const Vector& dir, const Vector& up)
 {
@@ -110,5 +112,5 @@
  * @param pitch: the pitch in radians
  * @param yaw: the yaw in radians
-*/
+ */
 Quaternion::Quaternion (float roll, float pitch, float yaw)
 {
@@ -136,5 +138,5 @@
  *  convert the Quaternion to a 4x4 rotational glMatrix
  * @param m: a buffer to store the Matrix in
-*/
+ */
 void Quaternion::matrix (float m[4][4]) const
 {
@@ -167,7 +169,6 @@
  * @param to where
  * @param t the time this transformation should take value [0..1]
-
  * @returns the Result of the smooth move
-*/
+ */
 Quaternion Quaternion::quatSlerp(const Quaternion& from, const Quaternion& to, float t)
 {
@@ -194,30 +195,11 @@
     }
 
-  //if( (1.0 - cosom) > DELTA )
-  //{
   omega = acos(cosom);
   sinom = sin(omega);
   scale0 = sin((1.0 - t) * omega) / sinom;
   scale1 = sin(t * omega) / sinom;
-  //}
-  /*
-    else
-    {
-    scale0 = 1.0 - t;
-    scale1 = t;
-    }
-  */
-
-
-  /*
-    Quaternion res;
-    res.v.x = scale0 * from.v.x + scale1 * tol[0];
-    res.v.y = scale0 * from.v.y + scale1 * tol[1];
-    res.v.z = scale0 * from.v.z + scale1 * tol[2];
-    res.w = scale0 * from.w + scale1 * tol[3];
-  */
   return Quaternion(Vector(scale0 * from.v.x + scale1 * tol[0],
-                           scale0 * from.v.y + scale1 * tol[1],
-                           scale0 * from.v.z + scale1 * tol[2]),
+                    scale0 * from.v.y + scale1 * tol[1],
+                    scale0 * from.v.z + scale1 * tol[2]),
                     scale0 * from.w + scale1 * tol[3]);
 }
@@ -227,5 +209,5 @@
  *  convert a rotational 4x4 glMatrix into a Quaternion
  * @param m: a 4x4 matrix in glMatrix order
-*/
+ */
 Quaternion::Quaternion (float m[4][4])
 {
Index: /trunk/src/lib/math/vector.h
===================================================================
--- /trunk/src/lib/math/vector.h	(revision 5419)
+++ /trunk/src/lib/math/vector.h	(revision 5420)
@@ -1,2 +1,17 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: Christian Meyer
+   co-programmer: ...
+*/
+
 /*!
  * @file vector.h
Index: /trunk/src/lib/shell/shell.cc
===================================================================
--- /trunk/src/lib/shell/shell.cc	(revision 5419)
+++ /trunk/src/lib/shell/shell.cc	(revision 5420)
@@ -84,5 +84,5 @@
   this->textSize = 20;
   this->lineSpacing = 0;
-  this->bActive = false;
+  this->bActive = true;
   this->fontFile = new char[strlen(SHELL_DEFAULT_FONT)+1];
   strcpy(this->fontFile, SHELL_DEFAULT_FONT);
@@ -94,4 +94,5 @@
   this->setBackgroundColor(SHELL_DEFAULT_BACKGROUND_COLOR);
 
+  this->deactivate();
   // register the shell at the ShellBuffer
   ShellBuffer::getInstance()->registerShell(this);
@@ -135,4 +136,5 @@
   {
     this->bufferText[i]->setText(bufferIT->getCurrent(), true);
+    this->bufferText[i]->setVisibility(true);
     bufferIT->prevStep();
   }
@@ -159,4 +161,5 @@
     this->bufferText[i]->setText(bufferIT->getCurrent(), false);
     bufferIT->prevStep();
+    this->bufferText[i]->setVisibility(false);
   }
   delete bufferIT;
@@ -254,5 +257,5 @@
     this->shellInput->setColor(this->textColor[0], this->textColor[1], this->textColor[2]);
     this->shellInput->setBlending(this->textColor[3]);
-    this->shellInput->setRelCoor2D(5, (this->textSize + this->lineSpacing)*this->bufferDisplaySize + this->textSize);
+    this->shellInput->setRelCoor2D(5, (this->textSize + this->lineSpacing)*(this->bufferDisplaySize));
   }
 
@@ -271,5 +274,4 @@
   }
   this->shellHeight = (this->textSize + this->lineSpacing) * (bufferDisplaySize+1);
-
 }
 
@@ -501,5 +503,5 @@
 Vector Shell::calculateLinePosition(unsigned int lineNumber)
 {
-  return Vector(5, (this->textSize + this->lineSpacing)*(this->bufferDisplaySize - lineNumber -1) + this->textSize, 0);
+  return Vector(5, (this->textSize + this->lineSpacing)*(this->bufferDisplaySize - lineNumber - 2) + this->textSize, 0);
 }
 
Index: /trunk/src/world_entities/player.cc
===================================================================
--- /trunk/src/world_entities/player.cc	(revision 5419)
+++ /trunk/src/world_entities/player.cc	(revision 5420)
@@ -149,5 +149,5 @@
   GLGuiButton* button = new GLGuiPushButton();
   button->show();
-  button->setLabel("test");
+  button->setLabel("orxonox");
   button->setBindNode(this);
 
