Index: trunk/src/defs/class_id.h
===================================================================
--- trunk/src/defs/class_id.h	(revision 8527)
+++ trunk/src/defs/class_id.h	(revision 8619)
@@ -287,4 +287,5 @@
   CL_TEXT                       =    0x00804000,
   CL_MULTI_LINE_TEXT            =    0x00000840,
+  CL_LIMITED_WIDTH_TEXT         =    0x00000841,
 
   // Texutres.
@@ -362,4 +363,5 @@
   CL_GLGUI_TEXTFIELD            =    0x00000b61,
   CL_GLGUI_IMAGE                =    0x00000b70,
+  CL_GLGUI_TABLE                =    0x00000b71,
 
   CL_GLGUI_NOTIFIER             =    0x00000b80,
Index: trunk/src/lib/event/event_handler.cc
===================================================================
--- trunk/src/lib/event/event_handler.cc	(revision 8527)
+++ trunk/src/lib/event/event_handler.cc	(revision 8619)
@@ -355,5 +355,5 @@
   else
   {
-    SDL_WM_GrabInput(SDL_GRAB_ON);
+    //SDL_WM_GrabInput(SDL_GRAB_ON);
     SDL_ShowCursor(SDL_DISABLE);
   }
Index: trunk/src/lib/graphics/Makefile.am
===================================================================
--- trunk/src/lib/graphics/Makefile.am	(revision 8527)
+++ trunk/src/lib/graphics/Makefile.am	(revision 8619)
@@ -4,28 +4,30 @@
 noinst_LIBRARIES = libORXgraphics.a
 
-libORXgraphics_a_SOURCES = graphics_engine.cc \
-			   light.cc \
-			   shader.cc \
-			   \
-			   render2D/render_2d.cc \
-			   render2D/element_2d.cc \
-			   render2D/image_plane.cc \
-			   \
-			   text_engine/text_engine.cc \
-			   text_engine/text.cc \
-			   text_engine/multi_line_text.cc \
-			   text_engine/font.cc \
-			   \
-			   effects/graphics_effect.cc \
-			   effects/atmospheric_engine.cc \
-			   effects/weather_effect.cc \
-			   effects/sun_effect.cc \
-			   effects/fog_effect.cc \
-			   effects/volfog_effect.cc \
-			   effects/rain_effect.cc \
-			   effects/snow_effect.cc \
-			   effects/cloud_effect.cc \
-			   effects/lightening_effect.cc \
-			   effects/lense_flare.cc
+libORXgraphics_a_SOURCES = \
+		graphics_engine.cc \
+		light.cc \
+		shader.cc \
+		\
+		render2D/render_2d.cc \
+		render2D/element_2d.cc \
+		render2D/image_plane.cc \
+		\
+		text_engine/text_engine.cc \
+		text_engine/text.cc \
+		text_engine/multi_line_text.cc \
+		text_engine/limited_width_text.cc \
+		text_engine/font.cc \
+		\
+		effects/graphics_effect.cc \
+		effects/atmospheric_engine.cc \
+		effects/weather_effect.cc \
+		effects/sun_effect.cc \
+		effects/fog_effect.cc \
+		effects/volfog_effect.cc \
+		effects/rain_effect.cc \
+		effects/snow_effect.cc \
+		effects/cloud_effect.cc \
+		effects/lightening_effect.cc \
+		effects/lense_flare.cc
 
 noinst_HEADERS = graphics_engine.h \
@@ -40,4 +42,5 @@
 		 text_engine/text.h \
 		 text_engine/multi_line_text.h \
+		 text_engine/limited_width_text.h \
 		 text_engine/font.h \
 		 text_engine/default_font.xpm \
Index: trunk/src/lib/graphics/effects/lense_flare.cc
===================================================================
--- trunk/src/lib/graphics/effects/lense_flare.cc	(revision 8527)
+++ trunk/src/lib/graphics/effects/lense_flare.cc	(revision 8619)
@@ -47,5 +47,4 @@
     this->setClassID(CL_LENSE_FLARE, "LenseFlare");
 
-    this->flareMatrix = new float[14];
     /*          length                      image scale */
     this->flareMatrix[0] = 1.0f;
Index: trunk/src/lib/graphics/effects/lense_flare.h
===================================================================
--- trunk/src/lib/graphics/effects/lense_flare.h	(revision 8527)
+++ trunk/src/lib/graphics/effects/lense_flare.h	(revision 8619)
@@ -51,5 +51,5 @@
     bool                     bVisible;          //!< Checks visibility
     Light*                   lightSource;        //!< reference to the sun (or primary light source)
-    std::vector<ImagePlane*>  flares;             //!< the flares array
+    std::vector<ImagePlane*> flares;             //!< the flares array
 
     Vector2D                 flareVector;        //!< the axis to draw the flares on
@@ -57,5 +57,5 @@
     Vector2D                 screenCenter;       //!< the vector marking the center of the screen
 
-    float*                   flareMatrix;
+    float                    flareMatrix[14];
     Plane                    frustumPlane;       //!< plane that marks the view frustum
 };
Index: trunk/src/lib/graphics/importer/material.cc
===================================================================
--- trunk/src/lib/graphics/importer/material.cc	(revision 8527)
+++ trunk/src/lib/graphics/importer/material.cc	(revision 8619)
@@ -22,4 +22,7 @@
 #include "debug.h"
 #include "compiler.h"
+
+#include "loading/load_param.h"
+
 #include "util/loading/resource_manager.h"
 
@@ -47,4 +50,37 @@
 }
 
+Material& Material::operator=(const Material& material)
+{
+  this->illumModel = material.illumModel;
+  this->diffuse = material.diffuse;
+  this->specular = material.specular;
+  this->ambient = material.ambient;
+  this->shininess = material.shininess;
+
+  this->textures = material.textures;
+  this->sFactor = material.sFactor;
+  this->tFactor = material.tFactor;
+  this->setName(material.getName());
+
+  return *this;
+}
+
+
+
+void Material::loadParams(const TiXmlElement* root)
+{
+  LoadParam(root, "illum", this, Material, setIllum);
+
+  LoadParam(root, "diffuse-color", this, Material , setDiffuse);
+  LoadParam(root, "ambient-color", this, Material , setAmbient);
+  LoadParam(root, "specular-color", this, Material , setSpecular);
+  LoadParam(root, "transparency", this, Material , setTransparency);
+
+  LoadParam(root, "tex", this, Material, setDiffuseMap);
+  LoadParam(root, "blendfunc", this, Material, setBlendFuncS)
+      .defaultValues("ZERO", "ZERO");
+}
+
+
 /**
  * @brief deletes a Material
@@ -65,16 +101,4 @@
 
 const Material* Material::selectedMaterial = NULL;
-
-const GLenum Material::glTextureArbs[] =
-{
-  GL_TEXTURE0,
-  GL_TEXTURE1,
-  GL_TEXTURE2,
-  GL_TEXTURE3,
-  GL_TEXTURE4,
-  GL_TEXTURE5,
-  GL_TEXTURE6,
-  GL_TEXTURE7
-};
 
 
@@ -104,19 +128,19 @@
  * @brief sets the material with which the following Faces will be painted
  */
-  bool Material::select() const
+bool Material::select() const
 {
   if (unlikely(this == Material::selectedMaterial))
-      return true;
-
-/// !!  HACK !!! FIX THIS IN MODEL ///
+    return true;
+
+  /// !!  HACK !!! FIX THIS IN MODEL ///
   else if (likely(Material::selectedMaterial != NULL))
   {
-  Material::unselect();
-//     for(unsigned int i = 0; i < Material::selectedMaterial->textures.size(); ++i)
-//     {
-//         glActiveTexture(Material::glTextureArbs[i]);
-//         glBindTexture(GL_TEXTURE_2D, 0);
-//         glDisable(GL_TEXTURE_2D);
-//     }
+    Material::unselect();
+    //     for(unsigned int i = 0; i < Material::selectedMaterial->textures.size(); ++i)
+    //     {
+    //         glActiveTexture(Material::glTextureArbs[i]);
+    //         glBindTexture(GL_TEXTURE_2D, 0);
+    //         glDisable(GL_TEXTURE_2D);
+    //     }
   }
 
@@ -125,11 +149,11 @@
     for(unsigned int i = 0; i < Material::selectedMaterial->textures.size(); ++i)
     {
-        glActiveTexture(Material::glTextureArbs[i]);
-        //glBindTexture(GL_TEXTURE_2D, 0);
-        glDisable(GL_TEXTURE_2D);
+      glActiveTexture(Material::glTextureArbs[i]);
+      //glBindTexture(GL_TEXTURE_2D, 0);
+      glDisable(GL_TEXTURE_2D);
     }
   }
 
-    // setting diffuse color
+  // setting diffuse color
   glColor4f (diffuse.r(), diffuse.g(), diffuse.b(), diffuse.a());
   // setting ambient color
@@ -161,11 +185,11 @@
   for(unsigned int i = 0; i < this->textures.size(); ++i)
   {
-      glActiveTexture(Material::glTextureArbs[i]);
-      glEnable(GL_TEXTURE_2D);
-      if(this->textures[i].hasAlpha())
-      {
-        glEnable(GL_BLEND);
-      }
-      glBindTexture(GL_TEXTURE_2D, this->textures[i].getTexture());
+    glActiveTexture(Material::glTextureArbs[i]);
+    glEnable(GL_TEXTURE_2D);
+    if(this->textures[i].hasAlpha())
+    {
+      glEnable(GL_BLEND);
+    }
+    glBindTexture(GL_TEXTURE_2D, this->textures[i].getTexture());
   }
   Material::selectedMaterial = this;
@@ -179,10 +203,10 @@
 {
   Material::selectedMaterial = NULL;
-    for(unsigned int i = 0; i < 8; ++i)
-    {
-        glActiveTexture(Material::glTextureArbs[i]);
-        glBindTexture(GL_TEXTURE_2D, 0);
-        glDisable(GL_TEXTURE_2D);
-    }
+  for(unsigned int i = 0; i < 8; ++i)
+  {
+    glActiveTexture(Material::glTextureArbs[i]);
+    glBindTexture(GL_TEXTURE_2D, 0);
+    glDisable(GL_TEXTURE_2D);
+  }
 }
 
@@ -252,4 +276,16 @@
   this->diffuse.a() = trans;
 }
+
+/**
+ * @brief sets the Blend-Function Parameters
+ * @param sFactor the Source Parameter.
+ * @param tFactor the Desitnation Parameter.
+ */
+void Material::setBlendFuncS(const std::string& sFactor, const std::string& tFactor)
+{
+  this->setBlendFunc(Material::stringToBlendFunc(sFactor), Material::stringToBlendFunc(tFactor));
+}
+
+
 
 /**
@@ -354,6 +390,6 @@
   // HACK
   glActiveTexture(textureNumber);
-   glEnable(GL_TEXTURE_2D);
-   glBindTexture(GL_TEXTURE_2D, this->textures[textureNumber].getTexture());
+  glEnable(GL_TEXTURE_2D);
+  glBindTexture(GL_TEXTURE_2D, this->textures[textureNumber].getTexture());
   glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
 
@@ -387,6 +423,5 @@
  */
 void Material::setBump(const std::string& bump)
-{
-}
+{}
 
 
@@ -400,2 +435,69 @@
   return maxTexUnits;
 }
+
+const GLenum Material::glTextureArbs[] =
+{
+  GL_TEXTURE0,
+  GL_TEXTURE1,
+  GL_TEXTURE2,
+  GL_TEXTURE3,
+  GL_TEXTURE4,
+  GL_TEXTURE5,
+  GL_TEXTURE6,
+  GL_TEXTURE7
+};
+
+
+/**
+ * @param blendFunc the Enumerator to convert to a String.
+ * @returns the matching String if found
+ */
+const std::string& Material::blendFuncToString(GLenum blendFunc)
+{
+  for (unsigned int i = 0; i < 9; ++i)
+    if (blendFunc == Material::glBlendFuncParams[i])
+      return Material::blendFuncNames[i];
+  PRINTF(2)("Supplied an Invalid Enumerator to blendfunc %d\n", blendFunc);
+  return Material::blendFuncNames[0];
+}
+
+/**
+ * @param blendFuncString the String to convert into a gl-enumeration
+ * @returns the matching GL-enumeration if found.
+ */
+GLenum Material::stringToBlendFunc(const std::string& blendFuncString)
+{
+  for (unsigned int i = 0; i < 9; ++i)
+    if (blendFuncString == Material::blendFuncNames[i])
+      return Material::glBlendFuncParams[i];
+  PRINTF(2)("BlendFunction %s not recognized using %s\n", blendFuncString.c_str(), Material::blendFuncNames[0].c_str());
+  return Material::glBlendFuncParams[0];
+}
+
+
+const GLenum Material::glBlendFuncParams[] =
+  {
+    GL_ZERO,
+    GL_ONE,
+    GL_DST_COLOR,
+    GL_ONE_MINUS_DST_COLOR,
+    GL_SRC_ALPHA,
+    GL_ONE_MINUS_SRC_ALPHA,
+    GL_DST_ALPHA,
+    GL_ONE_MINUS_DST_ALPHA,
+    GL_SRC_ALPHA_SATURATE
+  };
+
+const std::string Material::blendFuncNames[] =
+  {
+    "ZERO",
+    "ONE",
+    "DST_COLOR",
+    "ONE_MINUS_DST_COLOR",
+    "SRC_ALPHA",
+    "ONE_MINUS_SRC_ALPHA",
+    "DST_ALPHA",
+    "ONE_MINUS_DST_ALPHA",
+    "SRC_ALPHA_SATURATE"
+
+  };
Index: trunk/src/lib/graphics/importer/material.h
===================================================================
--- trunk/src/lib/graphics/importer/material.h	(revision 8527)
+++ trunk/src/lib/graphics/importer/material.h	(revision 8619)
@@ -24,60 +24,74 @@
 class Material : public BaseObject
 {
-  public:
-    Material (const std::string& mtlName = "");
-    virtual ~Material ();
+public:
+  Material (const std::string& mtlName = "");
+  virtual ~Material ();
 
-    Material& operator=(const Material& material);
+  void loadParams(const TiXmlElement* root);
 
-    bool select () const;
-    bool activateTextureUnit(unsigned int textureNumber);
-    static void unselect();
+  Material& operator=(const Material& material);
 
-    void setIllum (int illum);
-    int getIllumModel() const { return this->illumModel; };
+  bool select () const;
+  bool activateTextureUnit(unsigned int textureNumber);
+  static void unselect();
 
-    void setDiffuse (float r, float g, float b);
-    void setDiffuseColor(const Color& diffuseColor) { this->diffuse = diffuseColor; };
-    void setAmbient (float r, float g, float b);
-    void setSpecular (float r, float g, float b);
-    void setShininess (float shini);
-    void setTransparency (float trans);
-    void setBlendFunc(GLenum sFactor, GLenum tFactor) { this->sFactor = sFactor; this->tFactor = tFactor; };
+  void setIllum (int illum);
+  int getIllumModel() const { return this->illumModel; };
 
-    const Color& getDiffuseColor() const { return diffuse; };
+  void setDiffuse (float r, float g, float b);
+  void setDiffuseColor(const Color& diffuseColor) { this->diffuse = diffuseColor; };
+  void setAmbient (float r, float g, float b);
+  void setSpecular (float r, float g, float b);
+  void setShininess (float shini);
+  void setTransparency (float trans);
+  void setBlendFunc(GLenum sFactor, GLenum tFactor) { this->sFactor = sFactor; this->tFactor = tFactor; };
+  void setBlendFuncS(const std::string& sFactor, const std::string& tFactor);
 
-    // MAPPING //
-    void setDiffuseMap(const Texture& texture, unsigned int textureNumber = 0);
-    void setDiffuseMap(const std::string& dMap, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0);
-    void setSDLDiffuseMap(SDL_Surface *surface, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0);
-    void renderToTexture(unsigned int textureNumber, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+  Color& diffuseColor() { return diffuse; };
+  const Color& diffuseColor() const { return diffuse; };
 
-    void setAmbientMap(const std::string& aMap, GLenum target = GL_TEXTURE_2D);
-    void setSpecularMap(const std::string& sMap, GLenum target = GL_TEXTURE_2D);
-    void setBump(const std::string& bump);
-    GLuint getDiffuseTexture(unsigned int i = 0) const { return (this->textures.size() > i)? this->textures[i].getTexture() : 0; };
+  // MAPPING //
+  void setDiffuseMap(const Texture& texture, unsigned int textureNumber = 0);
+  void setDiffuseMap(const std::string& dMap, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0);
+  void setSDLDiffuseMap(SDL_Surface *surface, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0);
+  void renderToTexture(unsigned int textureNumber, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
 
-    static void addTexturePath(const std::string& pathName);
+  void setAmbientMap(const std::string& aMap, GLenum target = GL_TEXTURE_2D);
+  void setSpecularMap(const std::string& sMap, GLenum target = GL_TEXTURE_2D);
+  void setBump(const std::string& bump);
 
-  public:
-    static const GLenum glTextureArbs[];  //!< The Texture ARB's
+  GLuint diffuseTextureID(unsigned int i = 0) const { return (this->textures.size() > i)? this->textures[i].getTexture() : 0; };
 
-    static unsigned int getMaxTextureUnits();
+  const Texture& diffuseTexture(unsigned int i = 0) const { return this->textures[i]; };
 
-  private:
-    static const Material* selectedMaterial; //!< The currently selected material.
+  static void addTexturePath(const std::string& pathName);
 
-    int              illumModel;       //!< The IlluminationModel is either flat or smooth.
-    Color            diffuse;          //!< The diffuse color of the Material. (also transparency.)
-    Color            ambient;          //!< The ambient color of the Material.
-    Color            specular;         //!< The specular color of the Material.
-    float            shininess;        //!< The shininess of the Material.
-    GLenum           sFactor;          //!< The Blending Factor for the Source.
-    GLenum           tFactor;          //!< The Blending Factor for the Destination.
+  const std::string& blendFuncToString(GLenum blendFunc);
+  GLenum stringToBlendFunc(const std::string& blendFuncString);
 
-    std::vector<Texture> textures;     //!< An Array of Textures.
 
-    Texture*         ambientTexture;   //!< The ambient texture of the Material.
-    Texture*         specularTexture;  //!< The specular texture of the Material.
+public:
+  static const GLenum glTextureArbs[];  //!< The Texture ARB's
+
+  static const GLenum glBlendFuncParams[];
+  static const std::string blendFuncNames[];
+
+  static unsigned int getMaxTextureUnits();
+
+private:
+  static const Material* selectedMaterial; //!< The currently selected material.
+
+  int              illumModel;       //!< The IlluminationModel is either flat or smooth.
+  Color            diffuse;          //!< The diffuse color of the Material. (also transparency.)
+  Color            ambient;          //!< The ambient color of the Material.
+  Color            specular;         //!< The specular color of the Material.
+  float            shininess;        //!< The shininess of the Material.
+  GLenum           sFactor;          //!< The Blending Factor for the Source.
+  GLenum           tFactor;          //!< The Blending Factor for the Destination.
+
+  std::vector<Texture> textures;     //!< An Array of Textures.
+
+  Texture*         ambientTexture;   //!< The ambient texture of the Material.
+  Texture*         specularTexture;  //!< The specular texture of the Material.
 };
 
Index: trunk/src/lib/graphics/importer/texture_sequence.cc
===================================================================
--- trunk/src/lib/graphics/importer/texture_sequence.cc	(revision 8527)
+++ trunk/src/lib/graphics/importer/texture_sequence.cc	(revision 8619)
@@ -180,5 +180,5 @@
   }
   bool success = this->addFrame(addSurface);
-  delete addSurface;
+  SDL_FreeSurface(addSurface);
 
   return success;
Index: trunk/src/lib/graphics/text_engine/limited_width_text.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/limited_width_text.cc	(revision 8619)
+++ trunk/src/lib/graphics/text_engine/limited_width_text.cc	(revision 8619)
@@ -0,0 +1,175 @@
+/*
+   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: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS
+
+#include "limited_width_text.h"
+#include "font.h"
+
+/**
+ * @brief creates a new Text Element
+ * @param fontFile the Font to render this text in
+ * @param type The renderType to display this font in
+ */
+LimitedWidthText::LimitedWidthText(const std::string& fontFile, unsigned int textSize, float lineWidth, DotsPosition dotsPosition)
+    : Text(fontFile, textSize)
+{
+  this->setClassID(CL_LIMITED_WIDTH_TEXT, "LimitedWidthText");
+
+  this->_dotsPosition = End;
+  this->setLineWidth(lineWidth);
+}
+
+/**
+ * @brief sets the maximum Line width
+ * @param lineWidth the maximum lineWidth.
+ */
+void LimitedWidthText::setLineWidth(float lineWidth)
+{
+  this->_lineWidth = lineWidth;
+  this->setupTextWidth();
+}
+
+/**
+ * @brief sets the Dots Position
+ * @param dotsPosition the Position of the Dots
+ */
+void LimitedWidthText::setDotsPosition(DotsPosition dotsPosition)
+{
+  this->_dotsPosition = dotsPosition;
+  this->setupTextWidth();
+}
+
+
+/**
+ * @brief draws the Text
+ */
+void LimitedWidthText::draw() const
+{
+  if (unlikely(this->_dotedText.empty()))
+    return;
+  glPushMatrix();
+  glPushAttrib(GL_ENABLE_BIT);
+  // transform for alignment.
+  if (this->getAlignment() == TEXT_ALIGN_RIGHT)
+    glTranslatef(-this->getSizeX2D(), 0, 0);
+  else if (this->getAlignment() == TEXT_ALIGN_CENTER || this->getAlignment() == TEXT_ALIGN_SCREEN_CENTER)
+    glTranslatef(-this->getSizeX2D()/2, 0, 0);
+
+  // drawing this Text.
+  // setting the Blending effects
+  glColor4fv(&this->color()[0]);
+
+
+  glActiveTexture(GL_TEXTURE0);
+
+  glEnable(GL_BLEND);
+  glEnable(GL_TEXTURE_2D);
+  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+  glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, GL_MODULATE );
+
+  glBindTexture(GL_TEXTURE_2D, this->font()->getTexture());
+  glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
+  glRotatef(this->getAbsDir2D(), 0, 0, 1);
+
+  Glyph* tmpGlyph;
+  float posX = 0.0f;
+  glBegin(GL_QUADS);
+  for (unsigned int i = 0; i < this->_dotedText.size(); i++)
+  {
+    if(likely((tmpGlyph = this->font()->getGlyphArray()[this->_dotedText[i]]) != NULL))
+    {
+      glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]);
+      glVertex2d(posX+tmpGlyph->maxX*this->size(), 0);
+
+      glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[3]);
+      glVertex2d(posX+tmpGlyph->maxX*this->size(), this->size());
+
+      glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[3]);
+      glVertex2d(posX+tmpGlyph->minX*this->size(), this->size());
+
+      glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[2]);
+      glVertex2d(posX+tmpGlyph->minX*this->size(), 0);
+
+      posX += tmpGlyph->advance * this->size();
+    }
+  }
+  glEnd();
+  glPopAttrib();
+  glPopMatrix();
+}
+
+
+/**
+ * @brief setting up the Text-Width if DYNAMIC
+ */
+void LimitedWidthText::setupTextWidth()
+{
+  float dotsSize = this->font()->getGlyphArray()[46]->advance * 3.0;
+
+  float width = 0.0f;
+  float maxWidth = this->_lineWidth / this->size();
+
+  this->_dotedText = this->text();
+
+  switch (this->_dotsPosition)
+  {
+    case End:
+      for (unsigned int i = 0; i < this->text().size(); i++)
+      {
+        if (width + dotsSize > maxWidth )
+        {
+          this->_dotedText = this->text().substr(0, i) + "...";
+          if (i > 0)
+            width -= this->font()->getGlyphArray()[this->text()[i-1]]->advance;
+          width += dotsSize;
+          break;
+        }
+        // Advance the Text.
+        if(this->font()->getGlyphArray()[this->text()[i]] != NULL)
+          width += this->font()->getGlyphArray()[this->text()[i]]->advance;
+      }
+      break;
+
+    case Begin:
+      int i = text().size() -1;
+      for (; i >= 0; --i)
+      {
+        if (width + dotsSize > maxWidth )
+        {
+          this->_dotedText = std::string("...") + this->text().substr(i);
+          if (i + 1 < (int)text().size() )
+            width -= this->font()->getGlyphArray()[this->text()[i+1]]->advance;
+          width += dotsSize;
+          break;
+        }
+        // Advance the Text.
+        if(this->font()->getGlyphArray()[this->text()[i]] != NULL)
+          width += this->font()->getGlyphArray()[this->text()[i]]->advance;
+      }
+      break;
+  }
+
+  printf("%f %s\n", width, _dotedText.c_str());
+  this->setSizeX2D(width * this->size());
+}
+
+/**
+ * @brief print out some nice debug output
+ */
+void LimitedWidthText::debug() const
+{
+  printf("Debug %s::%s \n", this->getClassName(), this->getName() );
+}
Index: trunk/src/lib/graphics/text_engine/limited_width_text.h
===================================================================
--- trunk/src/lib/graphics/text_engine/limited_width_text.h	(revision 8619)
+++ trunk/src/lib/graphics/text_engine/limited_width_text.h	(revision 8619)
@@ -0,0 +1,51 @@
+/*!
+ * @file limited_width_text.h
+ * @brief Definition of a text Class, that is able to render text.
+ */
+
+#ifndef _LIMITED_WIDTH_TEXT_H
+#define _LIMITED_WIDTH_TEXT_H
+
+#include "text.h"
+
+#include <vector>
+
+//! Represents one textElement.
+class LimitedWidthText : public Text
+{
+  public:
+    typedef enum {
+      Begin,
+      End,
+    } DotsPosition;
+
+
+  public:
+    LimitedWidthText(const std::string& fontFile = "", unsigned int fontSize = TEXT_DEFAULT_SIZE, float lineWidth = 100.0, DotsPosition dotsPosition = Begin);
+
+    // Setup:
+    void setLineWidth(float lineWidth);
+    void setDotsPosition(DotsPosition dotsPosition);
+
+    // Retrieve:
+    /** @returns the LineWidth (maximum distance from the left to the right */
+    inline float lineWidth() const { return this->_lineWidth; };
+    /** @returns the dots position. */
+    inline float dotsPosition() const { return this->_dotsPosition; };
+
+    virtual void draw() const;
+
+    void debug() const;
+
+  protected:
+    virtual void setupTextWidth();
+
+  private:
+    std::string                _dotedText;
+
+    DotsPosition               _dotsPosition;
+    float                      _lineWidth;
+    unsigned int               _lineEnds;
+};
+
+#endif /* _LIMITED_WIDTH_TEXT_H */
Index: trunk/src/lib/graphics/text_engine/multi_line_text.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/multi_line_text.cc	(revision 8527)
+++ trunk/src/lib/graphics/text_engine/multi_line_text.cc	(revision 8619)
@@ -61,5 +61,5 @@
 void MultiLineText::draw() const
 {
-  if (unlikely(this->getText().empty()))
+  if (unlikely(this->text().empty()))
     return;
   glPushMatrix();
@@ -76,5 +76,5 @@
   glActiveTexture(GL_TEXTURE0);
 
-  glColor4fv(&this->getColor()[0]);
+  glColor4fv(&this->color()[0]);
   glEnable(GL_BLEND);
   glEnable(GL_TEXTURE_2D);
@@ -82,5 +82,5 @@
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, GL_MODULATE );
 
-  glBindTexture(GL_TEXTURE_2D, this->getFont()->getTexture());
+  glBindTexture(GL_TEXTURE_2D, this->font()->getTexture());
   glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0);
   glRotatef(this->getAbsDir2D(), 0, 0, 1);
@@ -92,5 +92,5 @@
 
   glBegin(GL_QUADS);
-  for (unsigned int i = 0; i < this->getText().size(); ++i)
+  for (unsigned int i = 0; i < this->text().size(); ++i)
   {
     if (unlikely(this->lineEnds.size() > lineNumber && i == this->lineEnds[lineNumber]))
@@ -99,22 +99,22 @@
       ++lineNumber;
       posX = 0.0f;
-      posY += this->lineSpacing + this->getSize(); //this->getFont()->getMaxHeight();
+      posY += this->lineSpacing + this->size(); //this->font()->getMaxHeight();
     }
 
-    if(likely((tmpGlyph = this->getFont()->getGlyphArray()[this->getText()[i]]) != NULL))
+    if(likely((tmpGlyph = this->font()->getGlyphArray()[this->text()[i]]) != NULL))
     {
       glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]);
-      glVertex2d(posX+tmpGlyph->maxX*this->getSize(), posY);
+      glVertex2d(posX+tmpGlyph->maxX*this->size(), posY);
 
       glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[3]);
-      glVertex2d(posX+tmpGlyph->maxX*this->getSize(), posY + this->getSize());
+      glVertex2d(posX+tmpGlyph->maxX*this->size(), posY + this->size());
 
       glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[3]);
-      glVertex2d(posX+tmpGlyph->minX*this->getSize(), posY+ this->getSize());
+      glVertex2d(posX+tmpGlyph->minX*this->size(), posY+ this->size());
 
       glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[2]);
-      glVertex2d(posX+tmpGlyph->minX*this->getSize(), posY);
+      glVertex2d(posX+tmpGlyph->minX*this->size(), posY);
 
-      posX += tmpGlyph->advance * this->getSize();
+      posX += tmpGlyph->advance * this->size();
     }
   }
@@ -132,14 +132,14 @@
   this->lineEnds.clear();
   float width = 0.0f;
-  float maxWidth = this->lineWidth / this->getSize();
+  float maxWidth = this->lineWidth / this->size();
 
-  for (unsigned int i = 0; i < this->getText().size(); i++)
+  for (unsigned int i = 0; i < this->text().size(); i++)
   {
-    if (width > maxWidth || this->getText()[i] == '\n')
+    if (width > maxWidth || this->text()[i] == '\n')
     {
       if (likely(i > 0))
       {
         this->lineEnds.push_back( i -1 );
-        width = this->getFont()->getGlyphArray()[this->getText()[i-1]]->advance;
+        width = this->font()->getGlyphArray()[this->text()[i-1]]->advance;
       }
       else
@@ -148,9 +148,9 @@
 
     // Advance the Text.
-    if(this->getFont()->getGlyphArray()[this->getText()[i]] != NULL)
-      width += this->getFont()->getGlyphArray()[this->getText()[i]]->advance;
+    if(this->font()->getGlyphArray()[this->text()[i]] != NULL)
+      width += this->font()->getGlyphArray()[this->text()[i]]->advance;
   }
   this->lineCount = lineEnds.size() + 1;
-  this->setSizeY2D((this->lineEnds.size()+1) * (this->lineSpacing + this->getFont()->getMaxHeight()));
+  this->setSizeY2D((this->lineEnds.size()+1) * (this->lineSpacing + this->font()->getMaxHeight()));
 }
 
@@ -162,5 +162,5 @@
  printf("Debug %s::%s: %d lines\n", this->getClassName(), this->getName(), this->getLineCount());
 
- std::string tmpText = this->getText();
+ std::string tmpText = this->text();
  std::vector<unsigned int> ends = this->lineEnds;
  ends.push_back(tmpText.size());
Index: trunk/src/lib/graphics/text_engine/text.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/text.cc	(revision 8527)
+++ trunk/src/lib/graphics/text_engine/text.cc	(revision 8619)
@@ -22,6 +22,4 @@
 #include "debug.h"
 
-using namespace std;
-
 /**
  * @brief creates a new Text Element
@@ -34,8 +32,8 @@
 
   // initialize this Text
-  this->font = NULL;
-  this->size = textSize;
-  this->setSizeY2D(size);
-  this->color = TEXT_DEFAULT_COLOR;
+  this->_font = NULL;
+  this->_size = textSize;
+  this->setSizeY2D(textSize);
+  this->_color = TEXT_DEFAULT_COLOR;
 
   this->setAlignment(TEXT_DEFAULT_ALIGNMENT);
@@ -47,5 +45,5 @@
 {
   this->setClassID(CL_TEXT, "Text");
-  this->font = NULL;
+  this->_font = NULL;
 
   *this = text;
@@ -58,6 +56,6 @@
 Text::~Text()
 {
-  if (this->font != NULL && this->font != Font::getDefaultFont())
-    ResourceManager::getInstance()->unload(this->font);
+  if (this->_font != NULL && this->_font != Font::getDefaultFont())
+    ResourceManager::getInstance()->unload(this->_font);
 }
 
@@ -69,8 +67,8 @@
 bool Text::operator==(const Text& text) const
 {
-  return (this->text == text.text &&
-          this->size == text.size &&
-          this->font == text.font &&
-          this->color == text.color);
+  return (this->_text == text._text &&
+          this->_size == text._size &&
+          this->_font == text._font &&
+          this->_color == text._color);
 }
 
@@ -82,5 +80,5 @@
 bool Text::operator==(const std::string& text) const
 {
-  return (this->text == text);
+  return (this->_text == text);
 }
 
@@ -92,13 +90,13 @@
 Text& Text::operator=(const Text& text)
 {
-  this->size = text.size;
-  this->color = text.color;
+  this->_size = text._size;
+  this->_color = text._color;
   this->setAlignment(text.getAlignment());
-  if (this->font != NULL)
-    ResourceManager::getInstance()->unload(this->font);
-
-  this->font = (Font*)ResourceManager::getInstance()->copy( text.font ); //!< HACK
-
-  this->text = text.text;
+  if (this->_font != NULL)
+    ResourceManager::getInstance()->unload(this->_font);
+
+  this->_font = (Font*)ResourceManager::getInstance()->copy( text._font ); //!< HACK
+
+  this->_text = text._text;
   return *this;
 }
@@ -110,5 +108,5 @@
 void Text::setText(const std::string& text)
 {
-  this->text = text;
+  this->_text = text;
   this->setupTextWidth();
 }
@@ -120,5 +118,5 @@
 void Text::append(const std::string& appendText)
 {
-  this->text += appendText;
+  this->_text += appendText;
   this->setupTextWidth();
 }
@@ -129,5 +127,5 @@
 void Text::appendCharacter(char character)
 {
-  this->text += character;
+  this->_text += character;
   this->setupTextWidth();
 }
@@ -141,5 +139,5 @@
 {
   this->append(appendText);
-  return this->text;
+  return this->_text;
 }
 
@@ -152,8 +150,8 @@
 void Text::removeCharacters(unsigned int chars)
 {
-  if (text.size() > chars)
-    this->text.resize(this->text.size()-chars);
-  else if (!text.empty())
-    text.clear();
+  if (this->_text.size() > chars)
+    this->_text.resize(this->_text.size()-chars);
+  else if (!this->_text.empty())
+    this->_text.clear();
   this->setupTextWidth();
 }
@@ -165,5 +163,5 @@
 void Text::clear()
 {
-  text.clear();
+  this->_text.clear();
   this->setupTextWidth();
 }
@@ -177,5 +175,5 @@
 {
   Font* newFont = NULL;
-  Font* oldFont = this->font;
+  Font* oldFont = this->_font;
 
   // load a new Font
@@ -194,5 +192,5 @@
 
   // unloading the Font if we alrady have one loaded.
-  this->font = newFont;
+  this->_font = newFont;
   if (oldFont != NULL && oldFont != Font::getDefaultFont())
     ResourceManager::getInstance()->unload(oldFont);
@@ -207,5 +205,5 @@
 void Text::setSize(float size)
 {
-  this->size = size;
+  this->_size = size;
   this->setSizeY2D(size);
   this->setupTextWidth();
@@ -218,5 +216,5 @@
 void Text::draw() const
 {
-  if (unlikely(this->text.empty()))
+  if (unlikely(this->_text.empty()))
     return;
   glPushMatrix();
@@ -230,5 +228,5 @@
   // drawing this Text.
   // setting the Blending effects
-  glColor4fv(&this->color[0]);
+  glColor4fv(&this->_color[0]);
 
 
@@ -240,5 +238,5 @@
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, GL_MODULATE );
 
-  glBindTexture(GL_TEXTURE_2D, font->getTexture());
+  glBindTexture(GL_TEXTURE_2D, this->_font->getTexture());
   glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
   glRotatef(this->getAbsDir2D(), 0, 0, 1);
@@ -247,21 +245,21 @@
   float posX = 0.0f;
   glBegin(GL_QUADS);
-  for (unsigned int i = 0; i < this->text.size(); i++)
+  for (unsigned int i = 0; i < this->_text.size(); i++)
   {
-    if(likely((tmpGlyph = this->getFont()->getGlyphArray()[this->text[i]]) != NULL))
+    if(likely((tmpGlyph = this->font()->getGlyphArray()[this->_text[i]]) != NULL))
     {
       glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]);
-      glVertex2d(posX+tmpGlyph->maxX*this->getSize(), 0);
+      glVertex2d(posX+tmpGlyph->maxX*this->size(), 0);
 
       glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[3]);
-      glVertex2d(posX+tmpGlyph->maxX*this->getSize(), this->getSize());
+      glVertex2d(posX+tmpGlyph->maxX*this->size(), this->size());
 
       glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[3]);
-      glVertex2d(posX+tmpGlyph->minX*this->getSize(), this->getSize());
+      glVertex2d(posX+tmpGlyph->minX*this->size(), this->size());
 
       glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[2]);
-      glVertex2d(posX+tmpGlyph->minX*this->getSize(), 0);
-
-      posX += tmpGlyph->advance * this->getSize();
+      glVertex2d(posX+tmpGlyph->minX*this->size(), 0);
+
+      posX += tmpGlyph->advance * this->size();
     }
   }
@@ -278,8 +276,8 @@
 {
   float width = 0;
-  for (unsigned int i = 0; i < this->text.size(); i++)
-    if(this->font->getGlyphArray()[this->text[i]] != NULL)
-      width += this->font->getGlyphArray()[this->text[i]]->advance;
-  this->setSizeX2D(width * this->getSize());
+  for (unsigned int i = 0; i < this->_text.size(); i++)
+    if(this->_font->getGlyphArray()[this->_text[i]] != NULL)
+      width += this->_font->getGlyphArray()[this->_text[i]]->advance;
+  this->setSizeX2D(width * this->size());
 }
 
@@ -290,6 +288,6 @@
 void Text::debug() const
 {
-  PRINT(0)("=== TEXT: %s (with Font:'%s')  displaying %s ===\n", this->getName(), this->font->getName(), this->text.c_str());
-  PRINT(0)("Color: r=%0.2f g=%0.2f b=%0.2f a=%0.2f\n", this->color.r(), this->color.g(), this->color.b(), this->color.a());
-}
-
+  PRINT(0)("=== TEXT: %s (with Font:'%s')  displaying %s ===\n", this->getName(), this->_font->getName(), this->_text.c_str());
+  PRINT(0)("Color: r=%0.2f g=%0.2f b=%0.2f a=%0.2f\n", this->_color.r(), this->_color.g(), this->_color.b(), this->_color.a());
+}
+
Index: trunk/src/lib/graphics/text_engine/text.h
===================================================================
--- trunk/src/lib/graphics/text_engine/text.h	(revision 8527)
+++ trunk/src/lib/graphics/text_engine/text.h	(revision 8619)
@@ -45,9 +45,9 @@
     void setFont(const std::string& fontFile, unsigned int renderSize);
     /** @param blending the blending intensity to set (between 0.0 and 1.0) */
-    inline void setBlending(float blending) { this->color.a() = blending; };
+    inline void setBlending(float blending) { this->_color.a() = blending; };
     /** @param r red @param g green @param b blue @brief sets the Color of the Text to render (values in [0-1]) */
-    void setColor(float r, float g, float b) { this->color = Color(r, g, b, this->color.a()); };
-    void setColor(float r, float g, float b, float a) { this->color = Color(r, g, b, a); };
-    void setColor(const Color& color) { this->color = color; };
+    void setColor(float r, float g, float b) { this->_color = Color(r, g, b, this->_color.a()); };
+    void setColor(float r, float g, float b, float a) { this->_color = Color(r, g, b, a); };
+    void setColor(const Color& color) { this->_color = color; };
     void setSize(float size);
 
@@ -55,14 +55,14 @@
     /// RETRIEVE
     /** @returns the String this Text displays */
-    inline const std::string& getText() const { return this->text; };
+    inline const std::string& text() const { return this->_text; };
 
     /** @returns the pointer to the stored Font (not changeable) */
-    inline const Font* const getFont() const { return this->font; };
+    inline const Font* const font() const { return this->_font; };
     /** @returns the Blending Value [0 invisible 1.0 full visible */
-    inline float getBlending() const { return this->color.a(); };
+    inline float blending() const { return this->_color.a(); };
     /** @returns: a Vector(r,g,b) @brief: retrieve a Vector holding the Color of the Text */
-    inline const Color& getColor() const { return this->color; };
+    inline const Color& color() const { return this->_color; };
     /** @returns the Size of the Text */
-    inline float getSize() const { return this->size; };
+    inline float size() const { return this->_size; };
 
     virtual void draw() const;
@@ -76,9 +76,9 @@
 
   private:
-    Font*             font;           //!< Font of this text
+    Font*             _font;           //!< Font of this text
 
-    std::string       text;           //!< The text to display
-    Color             color;          //!< The color of the font.
-    float             size;           //!< The size of the Text.
+    std::string       _text;           //!< The text to display
+    Color             _color;          //!< The color of the font.
+    float             _size;           //!< The size of the Text.
 };
 
Index: trunk/src/lib/gui/gl/Makefile.am
===================================================================
--- trunk/src/lib/gui/gl/Makefile.am	(revision 8527)
+++ trunk/src/lib/gui/gl/Makefile.am	(revision 8619)
@@ -12,5 +12,4 @@
 		glmenu/glmenu_imagescreen.cc \
 		\
-		glgui_style.cc \
 		glgui_handler.cc \
 		signal_connector.cc \
@@ -27,4 +26,5 @@
 		glgui_inputline.cc \
 		glgui_textfield.cc \
+		glgui_table.cc \
 		glgui_image.cc \
 		glgui_window.cc \
@@ -37,5 +37,4 @@
 		glmenu/glmenu_imagescreen.h \
 		\
-		glgui_style.h \
 		signal_connector.h \
 		glgui.h \
@@ -54,4 +53,5 @@
 		glgui_inputline.h \
 		glgui_textfield.h \
+		glgui_table.h \
 		glgui_image.h \
 		glgui_window.h \
Index: trunk/src/lib/gui/gl/glgui.h
===================================================================
--- trunk/src/lib/gui/gl/glgui.h	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui.h	(revision 8619)
@@ -16,5 +16,4 @@
 #include "glgui_button.h"
 #include "glgui_checkbutton.h"
-//#include "glgui_colorselector.h"
 #include "glgui_pushbutton.h"
 #include "glgui_slider.h"
@@ -22,4 +21,5 @@
 #include "glgui_inputline.h"
 #include "glgui_textfield.h"
+#include "glgui_table.h"
 #include "glgui_image.h"
 
Index: trunk/src/lib/gui/gl/glgui_box.cc
===================================================================
--- trunk/src/lib/gui/gl/glgui_box.cc	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_box.cc	(revision 8619)
@@ -110,5 +110,5 @@
     if (orientation() == OrxGui::Vertical)
     {
-      float height = this->borderTop();
+      float height = borderTop();
       float width = 0.0f;
       std::vector<GLGuiWidget*>::iterator widget;
@@ -117,11 +117,11 @@
       for (widget = this->children.begin(); widget != this->children.end(); ++widget)
       {
-        (*widget)->setRelCoor2D(this->borderLeft(), height);
+        (*widget)->setRelCoor2D(borderLeft(), height);
         height += (*widget)->getSizeY2D();
         width = fmax(width, (*widget)->getSizeX2D());
       }
 
-      width += this->borderLeft() + this->borderRight();
-      height += this->borderBottom(); /* *2 done further up */
+      width += borderLeft() + borderRight();
+      height += borderBottom(); /* *2 done further up */
 
       printf("%f %f\n", width, height);
@@ -130,6 +130,6 @@
     else
     {
-      float height = this->borderTop();
-      float width = this->borderLeft();
+      float height = borderTop();
+      float width = borderLeft();
       std::vector<GLGuiWidget*>::iterator widget;
 
@@ -137,11 +137,11 @@
       for (widget = this->children.begin(); widget != this->children.end(); ++widget)
       {
-        (*widget)->setRelCoor2D(width, this->borderTop());
+        (*widget)->setRelCoor2D(width, borderTop());
         height = fmax(height, (*widget)->getSizeY2D());
         width += (*widget)->getSizeX2D();
       }
 
-      width += this->borderRight() ;
-      height += this->borderBottom(); /* *2 done further up */
+      width += borderRight() ;
+      height += borderBottom(); /* *2 done further up */
 
       printf("%f %f\n", width, height);
Index: trunk/src/lib/gui/gl/glgui_button.cc
===================================================================
--- trunk/src/lib/gui/gl/glgui_button.cc	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_button.cc	(revision 8619)
@@ -55,5 +55,5 @@
 
     this->_label.setFont("fonts/final_frontier.ttf", 20);
-    this->_label.setColor(this->frontColor());
+    this->_label.setColor(this->foregroundColor() );
 
     this->_label.setParent2D(this);
@@ -71,5 +71,5 @@
   void GLGuiButton::updateFrontColor()
   {
-    this->_label.setColor(this->frontColor());
+    this->_label.setColor(this->foregroundColor());
   }
 
Index: trunk/src/lib/gui/gl/glgui_button.h
===================================================================
--- trunk/src/lib/gui/gl/glgui_button.h	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_button.h	(revision 8619)
@@ -36,5 +36,5 @@
       virtual ~GLGuiButton();
 
-      const std::string& label() const { return this->_label.getText(); };
+      const std::string& label() const { return this->_label.text(); };
       void setLabel(const std::string& label);
 
Index: trunk/src/lib/gui/gl/glgui_checkbutton.cc
===================================================================
--- trunk/src/lib/gui/gl/glgui_checkbutton.cc	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_checkbutton.cc	(revision 8619)
@@ -96,8 +96,7 @@
 //     this->frontMaterial().select();
 //     this->drawRect(this->frontRect());
-
     if (this->bActive)
     {
-      glColor3fv( &this->frontColor()[0]);
+      glColor3fv( &this->foregroundColor()[0]);
       this->drawRect(this->_checkBox);
 
@@ -124,5 +123,5 @@
     else
     {
-      glColor3fv( &this->frontColor()[0]);
+      glColor3fv( &this->foregroundColor()[0]);
       this->drawRect(this->_checkBox);
     }
Index: trunk/src/lib/gui/gl/glgui_container.cc
===================================================================
--- trunk/src/lib/gui/gl/glgui_container.cc	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_container.cc	(revision 8619)
@@ -43,4 +43,6 @@
     this->setClassID(CL_GLGUI_CONTAINER, "GLGuiContainer");
 
+    this->setBackgroundTexture("gui_container_background.png");
+
   }
 
Index: trunk/src/lib/gui/gl/glgui_cursor.cc
===================================================================
--- trunk/src/lib/gui/gl/glgui_cursor.cc	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_cursor.cc	(revision 8619)
@@ -57,11 +57,11 @@
     this->setClassID(CL_GLGUI_CURSOR, "GLGuiCursor");
 
-    this->backMaterial().setDiffuse(1.0,0.0,0.0);
-    this->backMaterial().setDiffuseMap("cursor.png");
-    this->backMaterial().setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+    this->setBackgroundColor(Color(1.0, 1.0, 1.0, 1.0));
+    this->setBackgroundTexture("cursor.png");
     this->setSize2D(50, 50);
     this->setAbsCoor2D(100, 100);
     this->setLayer(E2D_LAYER_ABOVE_ALL);
     this->color = 0.0f;
+    this->frameNumber = 0.0f;
 
     this->resize();
@@ -79,5 +79,5 @@
   bool GLGuiCursor::loadTextureSequence(const std::string& imageNameSubstitue, unsigned int from, unsigned int to)
   {
-    this->backMaterial().setDiffuse(1.0, 1.0, 1.0);
+    //this->background().setDiffuse(1.0, 1.0, 1.0);
     return this->seq.loadImageSeries(imageNameSubstitue, from, to);
   }
@@ -97,5 +97,7 @@
         this->color -= 360.0;
       Vector color =  Color::HSVtoRGB(Vector(this->color, 1.0, 1.0));
-      this->backMaterial().setDiffuse(color.x, color.y, color.z);
+      //this->setBackgroundColor(color.x, color.y, color.z);
+      /// FIXME
+
     }
     //if (this->movement != Vector2D())
@@ -125,5 +127,5 @@
     this->beginDraw();
 
-    this->backMaterial().select();
+    this->background().select();
     if (!this->seq.empty())
       glBindTexture(GL_TEXTURE_2D, this->seq.getFrameTexture((int)frameNumber));
Index: trunk/src/lib/gui/gl/glgui_defs.h
===================================================================
--- trunk/src/lib/gui/gl/glgui_defs.h	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_defs.h	(revision 8619)
@@ -22,4 +22,5 @@
   } Orientation;
 
+  //! Names of Orientations
   const std::string OrientationString[] = {
     "Horizontal",
@@ -30,5 +31,5 @@
   typedef enum {
     Normal,           //!< Normal state of the GUI's Widgets.
-    Active,           //!< If the widget is Active.
+    Focused,           //!< If the widget is Active.
     Selected,         //!< If the Widget is Selected.
     Insensitive       //!< If the Widget is insensitive.
@@ -38,8 +39,9 @@
 #define GLGUI_DEFAULT_STYLE OrxGui::Normal
 
+//! names of the States.
   const std::string StateString[] =
     {
       "Normal",
-      "Active",
+      "Focused",
       "Selected",
       "Insensitive"
@@ -54,4 +56,5 @@
     } FeaturePosition;
 
+    //! Names of Feature-Positions
     const std::string FeaturePositionString[] =
     {
Index: trunk/src/lib/gui/gl/glgui_image.cc
===================================================================
--- trunk/src/lib/gui/gl/glgui_image.cc	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_image.cc	(revision 8619)
@@ -47,4 +47,5 @@
     this->setClassID(CL_GLGUI_IMAGE, "GLGuiImage");
 
+    this->setForegroundColor(Color(1,1,1,1));
     this->_imageMaterial.setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
@@ -76,10 +77,10 @@
   void GLGuiImage::updateFrontColor()
   {
-    this->_imageMaterial.setDiffuseColor(this->frontColor());
+    this->_imageMaterial.setDiffuseColor(foregroundColor());
   }
 
   void GLGuiImage::resize()
   {
-    this->_imagePlane.setTopLeft(this->borderLeft(), this->borderTop());
+    this->_imagePlane.setTopLeft(borderLeft(), borderTop());
     this->_imagePlane.setSize(this->getSizeX2D() - (borderLeft() + borderRight()), this->getSizeY2D() - (borderTop() + borderBottom()) );
     GLGuiWidget::resize();
Index: trunk/src/lib/gui/gl/glgui_inputline.cc
===================================================================
--- trunk/src/lib/gui/gl/glgui_inputline.cc	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_inputline.cc	(revision 8619)
@@ -52,7 +52,13 @@
     this->_text.setRelCoor2D(4,4);
     this->_text.setFont("fonts/final_frontier.ttf", 20);
-    this->_text.setColor(this->frontColor());
+    this->_text.setLineWidth(400);
+    this->_text.setDotsPosition(LimitedWidthText::Begin);
+    this->_text.setColor(foregroundColor());
     this->_text.setVisibility(false);
     this->resize();
+
+    this->delayNext = 0.0;
+    this->pressedKey = SDLK_FIRST;
+    this->pressedKeyName = SDLK_FIRST;
 
   }
@@ -116,6 +122,5 @@
     this->resize();
     this->setFrontColor(Color(1,1,1,1), true);
-    this->setFrontColor(Color(0,1,0,1));
-    emit(this->textChanged(this->_text.getText()));
+    emit(this->textChanged(this->_text.text()));
   }
 
@@ -139,5 +144,5 @@
   void GLGuiInputLine::pushEnter()
   {
-    emit(this->enterPushed(this->_text.getText()));
+    emit(this->enterPushed(this->_text.text()));
     if (this->_clearOnEnter)
       this->clear();
@@ -197,14 +202,14 @@
   void GLGuiInputLine::resize()
   {
-    this->_text.setRelCoor2D(this->borderLeft(), this->borderTop());
+    this->_text.setRelCoor2D(borderLeft(), borderTop());
     this->setSize2D( this->_text.getSize2D() + Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));
     GLGuiWidget::resize();
-/*    this->frontRect().setTopLeft(borderLeft(), borderTop());
-    this->frontRect().setSize(this->getSize2D() - Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));*/
+    /*    this->frontRect().setTopLeft(borderLeft(), borderTop());
+        this->frontRect().setSize(this->getSize2D() - Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));*/
   }
 
   void GLGuiInputLine::updateFrontColor()
   {
-    this->_text.setColor(this->frontColor());
+    this->_text.setColor(foregroundColor());
   }
 
@@ -228,5 +233,5 @@
     if (this->delayNext > 0.0)
       this->delayNext -= dt;
-        else if (this->pressedKey != SDLK_FIRST )
+    else if (this->pressedKey != SDLK_FIRST )
     {
       this->delayNext = GLGuiInputLine::repeatRate;
@@ -237,8 +242,8 @@
           break;
         default:
-        {
-          if (likely(this->pressedKey < 127))
-            this->appendCharacter(this->pressedKeyName);
-        }
+          {
+            if (likely(this->pressedKey < 127))
+              this->appendCharacter(this->pressedKeyName);
+          }
       }
     }
@@ -255,6 +260,6 @@
     GLGuiWidget::draw();
 
-//     this->frontMaterial().select();
-//     GLGuiWidget::drawRect(this->frontRect());
+    //     this->frontMaterial().select();
+    //     GLGuiWidget::drawRect(this->frontRect());
 
     this->endDraw();
Index: trunk/src/lib/gui/gl/glgui_inputline.h
===================================================================
--- trunk/src/lib/gui/gl/glgui_inputline.h	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_inputline.h	(revision 8619)
@@ -9,5 +9,5 @@
 
 #include "glgui_widget.h"
-#include "text.h"
+#include "limited_width_text.h"
 #include "event.h"
 
@@ -32,5 +32,5 @@
 
     /** @returns the text of the inputLine */
-    const std::string& _getText() const { return this->_text.getText(); };
+    const std::string& _getText() const { return this->_text.text(); };
 
     void setText(const std::string& text);
@@ -66,5 +66,5 @@
 
   private:
-    Text                    _text;            //!< The Text to display inside of the InputLine.
+    LimitedWidthText        _text;            //!< The Text to display inside of the InputLine.
     bool                    _clearOnEnter;    //!< Clear on Enter
 
Index: trunk/src/lib/gui/gl/glgui_slider.cc
===================================================================
--- trunk/src/lib/gui/gl/glgui_slider.cc	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_slider.cc	(revision 8619)
@@ -74,5 +74,5 @@
     else
       this->_value = value;
-    this->_handle.setCenter(this->sliderPosition(), this->borderTop() + (this->getSizeY2D() - this->borderTop() - borderBottom()) / 2.0);
+    this->_handle.setCenter(this->sliderPosition(), borderTop() + (this->getSizeY2D() - borderTop() - borderBottom()) / 2.0);
 
     emit(valueChanged(this->_value));
@@ -165,5 +165,5 @@
 //    this->frontRect().setTopLeft(this->borderLeft(), this->getSizeY2D()/2.0 - 2.0);
 //    this->frontRect().setSize(this->getSizeX2D() - borderLeft() - borderRight(), 4.0);
-    this->_slider.setTopLeft(this->borderLeft(), this->getSizeY2D() / 2.0 -2.0);
+    this->_slider.setTopLeft(borderLeft(), this->getSizeY2D() / 2.0 -2.0);
     this->_slider.setSize(this->getSizeX2D() - borderLeft() - borderRight(), 4.0);
     this->_handle.setSize(this->_sliderWidth, this->getSizeY2D() - borderTop() - borderBottom());
@@ -211,6 +211,6 @@
   {
     return (this->_value - this->_minValue)/( this->_maxValue - this->_minValue) *
-           (this->getSizeX2D() - (borderLeft() + borderRight() + 2.0*_sliderWidth)) +
-           (borderLeft() +_sliderWidth);
+        (this->getSizeX2D() - (borderLeft() + borderRight() + 2.0*_sliderWidth)) +
+        (borderLeft() +_sliderWidth);
   }
 
@@ -239,5 +239,5 @@
     GLGuiWidget::draw();
 
-    glColor4fv(&this->frontColor()[0]);
+    glColor4fv(&this->foregroundColor()[0]);
     this->drawRect(this->_slider);
     this->drawRect(this->_handle);
Index: trunk/src/lib/gui/gl/glgui_style.cc
===================================================================
--- trunk/src/lib/gui/gl/glgui_style.cc	(revision 8527)
+++ 	(revision )
@@ -1,222 +1,0 @@
-/*
-   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: ...
-   co-programmer: ...
-*/
-
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
-
-#include "glgui_style.h"
-
-#include "loading/load_param.h"
-
-namespace OrxGui
-{
-
-
-  /**
-   * @brief standard constructor
-  */
-  GLGuiStyle::GLGuiStyle (const TiXmlElement* root)
-  {
-    _font = NULL;
-    this->reset();
-
-
-    if (root != NULL)
-      this->loadParams(root);
-
-  }
-
-
-  /**
-   * @brief standard deconstructor
-   */
-  GLGuiStyle::~GLGuiStyle ()
-  {
-    // delete what has to be deleted here
-  }
-
-  void GLGuiStyle::reset()
-  {
-    this->setBorderLeft(1.0);
-    this->setBorderRight(1.0);
-    this->setBorderTop(1.0);
-    this->setBorderBottom(1.0);
-
-    this->setTextSize(20.0);
-    this->setBackgroundColor(1.0);
-    this->setForegroundColor(1.0);
-
-    this->setFeaturePosition(FeatureLeft);
-    this->setFont(NULL);
-
-    this->setAnimated(true);
-    this->setAnimatedStateChanges(true);
-  }
-
-  void GLGuiStyle::loadParams(const TiXmlElement* root)
-  {}
-
-  void GLGuiStyle::setBorderLeft(float value)
-  {
-    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
-      setBorderLeft(value, (OrxGui::State)i);
-  }
-
-  void GLGuiStyle::setBorderLeft(float value, OrxGui::State state)
-  {
-    _style[state]._borderLeft = value;
-  }
-
-  void GLGuiStyle::setBorderLeftS(float value, const std::string& state)
-  {
-  }
-
-
-  void GLGuiStyle::setBorderRight(float value)
-  {
-    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
-      setBorderRight(value, (OrxGui::State)i);
-  }
-
-  void GLGuiStyle::setBorderRight(float value, OrxGui::State state)
-  {
-    _style[state]._borderRight = value;
-  }
-
-  void GLGuiStyle::setBorderRightS(float value, const std::string& state)
-  {}
-
-
-  void GLGuiStyle::setBorderTop(float value)
-  {
-    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
-      setBorderTop(value, (OrxGui::State)i);
-  }
-
-  void GLGuiStyle::setBorderTop(float value, OrxGui::State state)
-  {
-    _style[state]._borderTop = value;
-  }
-
-  void GLGuiStyle::setBorderTopS(float value, const std::string& state)
-  {}
-
-
-  void GLGuiStyle::setBorderBottom(float value)
-  {
-    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
-      setBorderBottom(value, (OrxGui::State)i);
-  }
-
-  void GLGuiStyle::setBorderBottom(float value, OrxGui::State state)
-  {
-    _style[state]._borderBottom = value;
-  }
-
-  void GLGuiStyle::setBorderBottomS(float value, const std::string& state)
-  {}
-
-
-  void GLGuiStyle::setTextSize(float value)
-  {
-    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
-      setTextSize(value, (OrxGui::State)i);
-  }
-
-  void GLGuiStyle::setTextSize(float value, OrxGui::State state)
-  {
-    _style[state]._textSize = value;
-  }
-
-  void GLGuiStyle::setTextSizeS(float value, const std::string& state)
-  {}
-
-
-  void GLGuiStyle::setBackgroundColor(const Color& color)
-  {
-    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
-      setBackgroundColor(color, (OrxGui::State)i);
-  }
-
-  void GLGuiStyle::setBackgroundColor(const Color& color, OrxGui::State state)
-  {
-    _style[state]._backgroundColor = color;
-  }
-
-  void GLGuiStyle::setBackgroundColorS(float r, float g, float b, float a, const std::string& state)
-  {}
-
-
-  void GLGuiStyle::setBackgroundTexture(const Texture& texture)
-  {
-    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
-      setBackgroundTexture(texture, (OrxGui::State)i);
-  }
-
-  void GLGuiStyle::setBackgroundTexture(const Texture& texture, OrxGui::State state)
-  {
-    _style[state]._backgroundTexture = texture;
-  }
-
-  void GLGuiStyle::setBackgroundTexture(const std::string& textureName, const std::string& state)
-  {}
-
-
-  void GLGuiStyle::setForegroundColor(const Color& color)
-  {
-    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
-      setForegroundColor(color, (OrxGui::State)i);
-  }
-
-  void GLGuiStyle::setForegroundColor(const Color& color, OrxGui::State state)
-  {
-    _style[state]._foregroundColor = color;
-  }
-
-  void GLGuiStyle::setForegroundColorS(float r, float g, float b, float a, const std::string& state)
-  {}
-
-
-
-  void GLGuiStyle::setFeaturePosition(FeaturePosition featurePosition)
-  {
-    this->_featurePosition = featurePosition;
-  }
-
-  void GLGuiStyle::setFeaturePosition(const std::string& featurePosition)
-  {}
-
-
-  void GLGuiStyle::setFont(Font* font)
-  {
-    this->_font = font;
-  }
-
-  void GLGuiStyle::setFont(const std::string& fontName)
-  {
-    //this->font = new Font(fontName);
-  }
-
-
-  void GLGuiStyle::setAnimated(bool animated)
-  {
-    this->_animated = animated;
-  }
-
-  void GLGuiStyle::setAnimatedStateChanges(bool animated)
-  {
-    this->_animatedStateChanges = animated;
-  }
-
-}
Index: trunk/src/lib/gui/gl/glgui_style.h
===================================================================
--- trunk/src/lib/gui/gl/glgui_style.h	(revision 8527)
+++ 	(revision )
@@ -1,118 +1,0 @@
-/*!
- * @file glgui_style.h
- * @brief Definition of the OpenGL-GUI Style of a Class.
-*/
-
-#ifndef _GLGUI_STYLE_H
-#define _GLGUI_STYLE_H
-
-#include "glgui_defs.h"
-
-#include "font.h"
-#include "texture.h"
-#include "color.h"
-
-class TiXmlElement;
-
-namespace OrxGui
-{
-  //! A class for Defining Styles to the opengl-gui.
-  class GLGuiStyle
-  {
-  public:
-    GLGuiStyle(const TiXmlElement* root = NULL);
-    virtual ~GLGuiStyle();
-
-
-    /// Retrieve
-    inline float borderLeft(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._borderLeft; }
-    inline float borderRight(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._borderRight; }
-    inline float borderTop(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._borderTop; }
-    inline float borderBottom(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._borderBottom; }
-    inline float textSize(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._textSize; }
-    inline const Color& backgroundColor(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._backgroundColor; }
-    inline const Texture& backgrorundTexture(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._backgroundTexture; }
-    inline const Color& foregroundColor(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._foregroundColor; }
-
-    inline FeaturePosition featurePosition() const { return _featurePosition; }
-    inline const Font* const font() const { return _font; }
-    inline bool animated() const { return _animated; }
-    inline bool animatedStateChanges() const { return _animatedStateChanges; }
-
-
-
-    /// SETUP
-    void reset();
-    void loadParams(const TiXmlElement* root);
-
-    void setBorderLeft(float value);
-    void setBorderLeft(float value, OrxGui::State state);
-    void setBorderLeftS(float value, const std::string& state);
-
-    void setBorderRight(float value);
-    void setBorderRight(float value, OrxGui::State state);
-    void setBorderRightS(float value, const std::string& state);
-
-    void setBorderTop(float value);
-    void setBorderTop(float value, OrxGui::State state);
-    void setBorderTopS(float value, const std::string& state);
-
-    void setBorderBottom(float value);
-    void setBorderBottom(float value, OrxGui::State state);
-    void setBorderBottomS(float value, const std::string& state);
-
-    void setTextSize(float value);
-    void setTextSize(float value, OrxGui::State state);
-    void setTextSizeS(float value, const std::string& state);
-
-    void setBackgroundColor(const Color& color);
-    void setBackgroundColor(const Color& color, OrxGui::State state);
-    void setBackgroundColorS(float r, float g, float b, float a, const std::string& state);
-
-    void setBackgroundTexture(const Texture& texture);
-    void setBackgroundTexture(const Texture& texture, OrxGui::State state);
-    void setBackgroundTexture(const std::string& textureName, const std::string& state);
-
-    void setForegroundColor(const Color& color);
-    void setForegroundColor(const Color& color, OrxGui::State state);
-    void setForegroundColorS(float r, float g, float b, float a, const std::string& state);
-
-
-    void setFeaturePosition(FeaturePosition featurePosition);
-    void setFeaturePosition(const std::string& featurePosition);
-
-    void setFont(Font* font);
-    void setFont(const std::string& fontName);
-
-    void setAnimated(bool animated);
-    void setAnimatedStateChanges(bool animated);
-
-  private:
-    typedef struct
-    {
-      float             _borderLeft;           //!< The Distance to the left Border of the widget, before any internal Element starts.
-      float             _borderRight;          //!< The Distance to the right Border of the widget, before any internal Element starts.
-      float             _borderTop;            //!< The Distance to the top Border of the widget, before any internal Element starts
-      float             _borderBottom;         //!< The Distance to the bottom Border of the widget, before any internal Element starts
-
-      float             _textSize;             //!< The TextSize of the Widget.
-
-      Color             _backgroundColor;      //!< The BackgroundColor of the Widget.
-      Texture           _backgroundTexture;    //!< The BackgroundTexture of the Widget.
-
-      Color             _foregroundColor;      //!< The foregroundColor of the Widget.
-    }
-    StatedStyle;
-
-
-    StatedStyle         _style[GLGUI_STATE_COUNT];
-
-    FeaturePosition     _featurePosition;      //!< The Position a Feature will be layed at (checkbox(box), slider(text),...)
-    Font*               _font;                 //!< The Font used in the current Widget.
-
-
-    bool                _animated;             //!< If the Widget is animated (Texture might be an AnimatedTexture.)
-    bool                _animatedStateChanges; //!< If the Transitions between States are Animated automatically.
-  };
-}
-#endif /* _GLGUI_STYLE_H */
Index: trunk/src/lib/gui/gl/glgui_table.cc
===================================================================
--- trunk/src/lib/gui/gl/glgui_table.cc	(revision 8619)
+++ trunk/src/lib/gui/gl/glgui_table.cc	(revision 8619)
@@ -0,0 +1,266 @@
+/*
+   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: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI
+
+#include "glgui_table.h"
+#include "debug.h"
+
+namespace OrxGui
+{
+  /**
+   * @brief standard constructor
+   */
+  GLGuiTable::GLGuiTable (unsigned int rows, unsigned int columns)
+  {
+    this->init();
+    this->setRowCount(rows);
+    this->setColumnCount(columns);
+  }
+
+
+  /**
+   * @brief standard deconstructor
+   */
+  GLGuiTable::~GLGuiTable()
+  {}
+
+  /**
+   * @brief initializes the GUI-element
+   */
+  void GLGuiTable::init()
+  {
+    this->setClassID(CL_GLGUI_TABLE, "GLGuiTable");
+
+    this->setFocusable(true);
+    this->setClickable(true);
+
+    this->resize();
+  }
+
+
+  void GLGuiTable::setRowCount(unsigned int rowCount)
+  {
+
+    unsigned int currentRowCount = this->rowCount();
+    this->_entries.resize(rowCount);
+    for (unsigned int i = currentRowCount; i < this->rowCount(); ++i)
+    {
+      this->_entries[i].resize(columnCount(), LimitedWidthText("fonts/final_frontier.ttf", 20));
+      for (unsigned int j = 0; j < columnCount(); ++j)
+        this->applyTextSettings(i, j, &this->_entries[i][j]);
+    }
+
+    assert(this->checkIntegrity());
+    this->debug();
+
+    if (!this->isVisible())
+      this->hiding();
+  }
+
+  void GLGuiTable::setColumnCount(unsigned int columnCount)
+  {
+    unsigned int i;
+    unsigned int currentColumnCount = this->columnCount();
+
+    // setup Headers.
+    this->_headers.resize(columnCount, LimitedWidthText("fonts/final_frontier.ttf", 20));
+    for (i = currentColumnCount; i < columnCount; ++i)
+      this->applyTextSettings(0, i, &this->_headers[i]);
+
+    for (i = 0; i < rowCount(); i++)
+    {
+      this->_entries[i].resize(columnCount, LimitedWidthText("fonts/final_frontier.ttf", 20));
+      for (unsigned int j = currentColumnCount; j < columnCount; ++j)
+        this->applyTextSettings(i, j, &this->_entries[i][j]);
+
+    }
+    assert(this->checkIntegrity());
+    this->debug();
+
+    if (!this->isVisible())
+      this->hiding();
+  }
+
+
+
+
+  void GLGuiTable::setHeader(unsigned int number, const std::string& headerName)
+  {
+    if (number >= this->columnCount())
+      this->setColumnCount(number + 1);
+    this->_headers[number].setText(headerName);
+  }
+
+  void GLGuiTable::setHeader(const std::vector<std::string>& headerNames)
+  {
+    for (unsigned int i = 0; i < headerNames.size(); ++i)
+      this->setHeader(i, headerNames[i]);
+  }
+
+  void GLGuiTable::setEntry(unsigned int column, unsigned int row, const std::string& name)
+  {
+    if (column >= this->columnCount() )
+      this->setColumnCount(column + 1);
+    if (row >= this->rowCount() )
+      this->setRowCount(row + 1);
+    this->_entries[row][column].setText(name);
+  }
+
+  void GLGuiTable::setColumnWidth(unsigned int column, float size)
+  {
+    this->_headers[column].setLineWidth(size);
+    for (unsigned int i = 0; i < this->rowCount(); ++i)
+      this->_entries[i][column].setLineWidth(size);
+
+  }
+
+  /// TODO.
+  void GLGuiTable::setRowHeight(unsigned int row, unsigned int size)
+{}
+
+
+
+
+  /**
+   * removes the focus from this Widget.
+   */
+  void GLGuiTable::removedFocus()
+  {
+    GLGuiWidget::removedFocus();
+  }
+
+
+
+  /**
+   * @brief Processes an Event.
+   * @param event The event to be processed
+   * @return true if the event was catched.
+   */
+  bool GLGuiTable::processEvent(const Event& event)
+  {
+    return false;
+  }
+
+
+  /**
+   * @brief Resizes the Widget to the new Size-constraints.
+   */
+  void GLGuiTable::resize()
+  {
+    GLGuiWidget::resize();
+  }
+
+  void GLGuiTable::updateFrontColor()
+  {
+    for (unsigned int i = 0; i < this->columnCount(); ++i)
+    {
+      this->_headers[i].setColor(this->foregroundColor());
+      for (unsigned int j = 0; j < this->rowCount(); ++j)
+        this->_entries[j][i].setColor(this->foregroundColor());
+    }
+  }
+
+  void GLGuiTable::hiding()
+  {
+    for (unsigned int i = 0; i < this->columnCount(); ++i)
+    {
+      this->_headers[i].setVisibility(false);
+      for (unsigned int j = 0; j < this->rowCount(); ++j)
+        this->_entries[j][i].setVisibility(false);
+    }
+  }
+
+  void GLGuiTable::showing()
+  {
+    for (unsigned int i = 0; i < this->columnCount(); ++i)
+    {
+      this->_headers[i].setVisibility(true);
+      for (unsigned int j = 0; j < this->rowCount(); ++j)
+        this->_entries[j][i].setVisibility(true);
+    }
+  }
+
+
+  /**
+   * @brief ticks the Table
+   * @param dt the time passed.
+   */
+  void GLGuiTable::tick(float dt)
+{}
+
+  /**
+   * @brief draws the GLGuiTable
+   */
+  void GLGuiTable::draw() const
+  {
+    this->beginDraw();
+    GLGuiWidget::draw();
+
+    //     this->frontMaterial().select();
+    //     GLGuiWidget::drawRect(this->frontRect());
+
+    this->endDraw();
+  }
+
+
+  /**
+   * @brief applies the GLGuiNotifiers Settings to a single Text of the GLGuiNotifier.
+   * @param text the Text to apply the settings to.
+   */
+  void GLGuiTable::applyTextSettings(unsigned int row, unsigned int column, LimitedWidthText* text)
+  {
+    text->setSize(this->textSize());
+    //text->setLineWidth(  );
+    text->setFont("fonts/final_frontier.ttf", (int)this->textSize());
+
+    text->setColor(this->foregroundColor());
+    if (text->getParent2D() != this)
+      text->setParent2D(this);
+  }
+
+
+  void GLGuiTable::debug() const
+  {
+    PRINT(0)("Table: Size = %dx%d\n", this->rowCount(), this->columnCount());
+
+    for (unsigned int i = 0; i < this->rowCount(); ++i)
+      PRINT(0)("line %d: columns %d\n", i, this->_entries[i].size());
+  }
+
+
+  bool GLGuiTable::checkIntegrity() const
+  {
+    bool retVal = true;
+    if (rowCount() != this->_entries.size())
+    {
+      PRINTF(1)("ROW COUNT WRONG (is %d should be %d)\n", rowCount(), this->_entries.size());
+      retVal = false;
+    }
+    if (columnCount() != this->_headers.size())
+    {
+      PRINTF(1)("COLUMN COUNT WRONG (is %d should be %d)\n", columnCount(), this->_headers.size());
+      retVal = false;
+    }
+    for (unsigned int i = 0; i < this->rowCount(); ++i)
+      if (this->_entries[i].size() != this->columnCount())
+    {
+      PRINTF(1)("COLUMN-COUNT OF ROW %d WRONG (is %d should be %d)\n", i, this->_entries[i].size(), this->columnCount());
+      retVal = false;
+    }
+    return retVal;
+  }
+
+}
Index: trunk/src/lib/gui/gl/glgui_table.h
===================================================================
--- trunk/src/lib/gui/gl/glgui_table.h	(revision 8619)
+++ trunk/src/lib/gui/gl/glgui_table.h	(revision 8619)
@@ -0,0 +1,78 @@
+/*!
+ * @file glgui_table.h
+ * The gl_TABLE widget of th openglGUI
+ *
+ */
+
+#ifndef _GLGUI_TABLE_H
+#define _GLGUI_TABLE_H
+
+#include "glgui_widget.h"
+#include "limited_width_text.h"
+#include "event.h"
+
+// FORWARD DECLARATION
+namespace OrxGui
+{
+
+  //! This is Table part of the openglGUI class
+  /**
+   * The Table is a Widget, that displays a Line, that can be manipulated through
+   * Writing Text on it.
+   *
+   * Whenever the Text is changed the textChanged signal is emitted.
+   */
+  class GLGuiTable : public OrxGui::GLGuiWidget
+  {
+
+  public:
+    GLGuiTable(unsigned int rows, unsigned int columns);
+    virtual ~GLGuiTable();
+
+    unsigned int rowCount() const { return this->_entries.size(); };
+    unsigned int columnCount() const { return this->_headers.size(); };
+
+    void setRowCount(unsigned int rowCount);
+    void setColumnCount(unsigned int columnCount);
+
+    void setHeader(unsigned int number, const std::string& headerName);
+    void setHeader(const std::vector<std::string>& headerNames);
+
+    void setEntry(unsigned int column, unsigned int row, const std::string& name);
+
+    void setColumnWidth(unsigned int column, float size);
+    void setRowHeight(unsigned int row, unsigned int size);
+
+    virtual void tick(float dt);
+    virtual void draw() const;
+
+
+    void debug() const;
+
+  protected:
+    virtual void removedFocus();
+
+    virtual void updateFrontColor();
+    virtual void hiding();
+    virtual void showing();
+    virtual void resize();
+
+    virtual bool processEvent(const Event& event);
+
+
+  private:
+    void init();
+
+    void applyTextSettings(unsigned int row, unsigned int column, LimitedWidthText* text);
+    bool checkIntegrity() const;
+
+  private:
+    typedef std::vector<LimitedWidthText> TableTextList;
+    TableTextList                _headers;
+    std::vector<TableTextList>   _entries;     //!< inner is by column, outer is by row.
+
+
+  };
+}
+
+#endif /* _GLGUI_TABLE_H */
Index: trunk/src/lib/gui/gl/glgui_widget.cc
===================================================================
--- trunk/src/lib/gui/gl/glgui_widget.cc	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_widget.cc	(revision 8619)
@@ -14,5 +14,5 @@
 */
 
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI
+#define DEBUG_SPECIAL_MODULE 4//DEBUG_MODULE_GUI
 
 #include "glgui_widget.h"
@@ -23,4 +23,6 @@
 
 #include "debug.h"
+
+#include "loading/load_param.h"
 
 namespace OrxGui
@@ -39,4 +41,31 @@
 
   /**
+   * @brief loads Parameters for a Style from XML
+   * @param root the XML-Element to load from.
+   */
+  void GLGuiWidget::loadParams(const TiXmlElement* root)
+  {
+
+    /// STYLE
+    LoadParam(root, "border-left", this, GLGuiWidget, setBorderLeft);
+    LoadParam(root, "border-right", this, GLGuiWidget, setBorderRight);
+    LoadParam(root, "border-top", this, GLGuiWidget, setBorderTop);
+    LoadParam(root, "border-bottom", this, GLGuiWidget, setBorderBottom);
+
+    LoadParam(root, "text-size", this, GLGuiWidget, setTextSize);
+    LoadParam(root, "background-color", this, GLGuiWidget, setBackgroundColorS);
+    LoadParam(root, "foreground-color", this, GLGuiWidget, setForegroundColorS);
+
+    //    LoadParamXML(root, "backmat", this, GLGuiWidget, loadBackgroundMaterial);
+    //    LoadParamXML(root, "frontmat", this, GLGuiWidget, loadForegroundMaterial);
+
+    LoadParam(root, "feature-position", this, GLGuiWidget, setFeaturePositionS);
+    LoadParam(root, "Font", this, GLGuiWidget, setFont);
+
+    LoadParam(root, "animated-state-changes", this, GLGuiWidget, setAnimatedStateChanges);
+  }
+
+
+  /**
    * @brief standard deconstructor
    */
@@ -45,7 +74,4 @@
     if (this == GLGuiWidget::_focused)
       GLGuiWidget::_focused = NULL;
-
-    if (this->_toFrontColor)
-      delete this->_toFrontColor;
   }
 
@@ -66,17 +92,34 @@
     this->_clickable = false;
     this->_pushed = false;
+    this->_state = OrxGui::Normal;
+
+
+    this->_font = NULL;
+    this->resetStyle();
+
+    this->_animating = false;
+    this->_animationCycle = 0.0;
+    this->_animationDuration = 1.0;
+
+
+    this->setBackgroundColor(Color(.51, .3, .3, .5));
+    this->setBackgroundColor(Color(.3, .5, .3, 1), OrxGui::Selected);
+    this->_style[0]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+    this->_style[1]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+    this->_style[2]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+    this->_style[3]._background.setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
+    this->setForegroundColor(Color(1, 0, 0, 1), OrxGui::Normal);
+    this->setForegroundColor(Color(0, 0, 1, 1), OrxGui::Selected);
+    this->setForegroundColor(Color(0, 1, 0, 1), OrxGui::Focused);
+    this->setForegroundColor(Color(.1, .1, .1, 1), OrxGui::Insensitive);
 
     this->setVisibility(GLGUI_WIDGET_DEFAULT_VISIBLE);
 
-    this->_backMat.setDiffuseColor(Color(1.0, 0.5, 0.4, 1.0));
-    this->_backMat.setDiffuseMap("gui_element_background.png");
-    this->_frontColor = Color(1.0, 0.0, 0.0);
-    this->_toFrontColor = NULL;
-
-
-    this->_borderLeft = 15.0;
-    this->_borderRight = 1.0;
-    this->_borderTop = 1.0;
-    this->_borderBottom = 1.0;
+    this->setBorderLeft(15);
+    this->setBackgroundTexture("gui_element_background.png");
+
+    this->switchState(_state);
+    this->_currentStyle = this->_style[_state];
   }
 
@@ -121,54 +164,11 @@
   }
 
+
+
   void GLGuiWidget::setFrontColor(const Color& frontColor, bool instantaniously)
   {
-    if (instantaniously)
-    {
-      this->_frontColor = frontColor;
-      if (this->_toFrontColor != NULL)
-      {
-        delete this->_toFrontColor;
-        this->_toFrontColor = NULL;
-      }
-    }
-    else if (!this->_toFrontColor)
-      this->_toFrontColor = new Color(frontColor);
-    else
-      *this->_toFrontColor = frontColor;
-    //this->_frontColor = frontColor;
-    //this->updateFrontColor();
+    this->_currentStyle._foreground.setDiffuseColor(frontColor);
+    this->animateBack();
   };
-
-
-  void GLGuiWidget::setBorderSize(float borderSize)
-  {
-    this->_borderLeft = borderSize;
-    this->_borderRight = borderSize;
-    this->_borderTop = borderSize;
-    this->_borderBottom = borderSize;
-    this->resize();
-  }
-
-  void GLGuiWidget::setBorderLeft(float borderLeft)
-  {
-    this->_borderLeft = borderLeft;
-    this->resize();
-  }
-  void GLGuiWidget::setBorderRight(float borderRight)
-  {
-    this->_borderRight = borderRight;
-    this->resize();
-  }
-  void GLGuiWidget::setBorderTop(float borderTop)
-  {
-    this->_borderTop = borderTop;
-    this->resize();
-  }
-  void GLGuiWidget::setBorderBottom(float borderBottom)
-  {
-    this->_borderBottom = borderBottom;
-    this->resize();
-  }
-
 
 
@@ -201,22 +201,20 @@
   void GLGuiWidget::clicking(const Vector2D& pos)
   {
-    this->setFrontColor(Color(0, 0, 1));
-
+    this->switchState(OrxGui::Selected);
   }
 
   void GLGuiWidget::releasing(const Vector2D& pos)
   {
-    this->setFrontColor(Color(0,1,0));
-
+    this->switchState(OrxGui::Normal);
   }
 
   void GLGuiWidget::receivedFocus()
   {
-    this->setFrontColor(Color(0, 1, 0));
+    this->switchState(OrxGui::Focused);
   }
 
   void GLGuiWidget::removedFocus()
   {
-    this->setFrontColor(Color(1, 0, 0));
+    this->switchState(OrxGui::Normal);
 
   }
@@ -267,18 +265,480 @@
   }
 
-  void GLGuiWidget::tick(float dt)
-  {
-    if (this->_toFrontColor)
+
+  /**
+   * @brief resets the Style to the default Settings.
+   */
+  void GLGuiWidget::resetStyle()
+  {
+    this->setBorderLeft(1.0);
+    this->setBorderRight(1.0);
+    this->setBorderTop(1.0);
+    this->setBorderBottom(1.0);
+
+    this->setTextSize(20.0);
+    this->setBackgroundColor(1.0);
+    this->setForegroundColor(1.0);
+
+    this->setFeaturePosition(FeatureLeft);
+    this->setFont(NULL);
+
+    this->setAnimatedStateChanges(true);
+  }
+
+
+  /**
+   * @brief sets the Width of the left border for all States
+   * @param value the borderWidth
+   */
+  void GLGuiWidget::setBorderLeft(float value)
+  {
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+      setBorderLeft(value, (OrxGui::State)i);
+  }
+
+  /**
+   * @brief sets the Width of the left border.
+   * @param value the borderWidth
+   * @param state the State to set the borderwidth to
+   */
+  void GLGuiWidget::setBorderLeft(float value, OrxGui::State state)
+  {
+    _style[state]._borderLeft = value;
+    if (state == _state)
+      _currentStyle._borderLeft = value;
+  }
+
+  /**
+   * @brief sets the Width of the left border.
+   * @param value the borderWidth
+   * @param stateName the State to set the borderwidth to
+   */
+  void GLGuiWidget::setBorderLeftS(float value, const std::string& stateName)
+  {
+    OrxGui::State state;
+    if (getState(stateName, &state))
+      this->setBorderLeft(value, state);
+    else
+      this->setBorderLeft(value);
+  }
+
+  /**
+   * @brief sets the Width of the right border for all states.
+   * @param value the borderWidth
+   */
+  void GLGuiWidget::setBorderRight(float value)
+  {
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+      setBorderRight(value, (OrxGui::State)i);
+  }
+
+  /**
+   * @brief sets the Width of the right border.
+   * @param value the borderWidth
+   * @param state the State to setup.
+   */
+  void GLGuiWidget::setBorderRight(float value, OrxGui::State state)
+  {
+    _style[state]._borderRight = value;
+    if (state == _state)
+      _currentStyle._borderRight = value;
+  }
+
+  /**
+   * @brief sets the Width of the right border.
+   * @param value the borderWidth
+   * @param stateName the State to setup.
+   */
+  void GLGuiWidget::setBorderRightS(float value, const std::string& stateName)
+  {
+    OrxGui::State state;
+    if (getState(stateName, &state))
+      this->setBorderRight(value, state);
+    else
+      this->setBorderRight(value);
+  }
+
+
+  /**
+   * @brief sets the Width of the top border for all states.
+   * @param value the borderWidth
+   */
+  void GLGuiWidget::setBorderTop(float value)
+  {
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+      setBorderTop(value, (OrxGui::State)i);
+  }
+
+  /**
+   * @brief sets the Width of the top border.
+   * @param value the borderWidth
+   * @param state the State to setup.
+   */
+  void GLGuiWidget::setBorderTop(float value, OrxGui::State state)
+  {
+    _style[state]._borderTop = value;
+    if (state == _state)
+      _currentStyle._borderTop = value;
+  }
+
+  /**
+   * @brief sets the Width of the top border.
+   * @param value the borderWidth
+   * @param stateName the State to setup.
+   */
+  void GLGuiWidget::setBorderTopS(float value, const std::string& stateName)
+  {
+    OrxGui::State state;
+    if (getState(stateName, &state))
+      this->setBorderTop(value, state);
+    else
+      this->setBorderTop(value);
+  }
+
+
+  /**
+   * @brief sets the Width of the bottom border for all states.
+   * @param value the borderWidth
+   */
+  void GLGuiWidget::setBorderBottom(float value)
+  {
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+      setBorderBottom(value, (OrxGui::State)i);
+  }
+
+  /**
+   * @brief sets the Width of the bottom border.
+   * @param value the borderWidth
+   * @param state the State to setup.
+   */
+  void GLGuiWidget::setBorderBottom(float value, OrxGui::State state)
+  {
+    _style[state]._borderBottom = value;
+    if (state == _state)
+      _currentStyle._borderBottom = value;
+
+  }
+
+  /**
+   * @brief sets the Width of the bottom border for all states.
+   * @param value the borderWidth
+   * @param stateName the State to setup.
+   */
+  void GLGuiWidget::setBorderBottomS(float value, const std::string& stateName)
+  {
+    OrxGui::State state;
+    if (getState(stateName, &state))
+      this->setBorderBottom(value, state);
+    else
+      this->setBorderBottom(value);
+  }
+
+
+  /**
+   * @brief sets the TextSize for all states.
+   * @param value the TextSize
+   */
+  void GLGuiWidget::setTextSize(float value)
+  {
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+      setTextSize(value, (OrxGui::State)i);
+  }
+
+  /**
+   * @brief sets the TextSize.
+   * @param value the TextSize.
+   * @param state: the State to setup
+   */
+  void GLGuiWidget::setTextSize(float value, OrxGui::State state)
+  {
+    _style[state]._textSize = value;
+    if (state == _state)
+      _currentStyle._textSize = value;
+  }
+
+  /**
+   * @brief sets the TextSize.
+   * @param value the TextSize.
+   * @param stateName: the State to setup
+   */
+  void GLGuiWidget::setTextSizeS(float value, const std::string& stateName)
+  {
+    OrxGui::State state;
+    if (getState(stateName, &state))
+      this->setTextSize(value, state);
+    else
+      this->setTextSize(value);
+  }
+
+
+  /**
+   * @brief sets the Background Color for all States.
+   * @param color the Color.
+   */
+  void GLGuiWidget::setBackgroundColor(const Color& color)
+  {
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+      setBackgroundColor(color, (OrxGui::State)i);
+  }
+
+  /**
+   * @brief sets the Background Color.
+   * @param color the Color.
+   * @param state: the State to setup
+   */
+  void GLGuiWidget::setBackgroundColor(const Color& color, OrxGui::State state)
+  {
+    _style[state]._background.setDiffuseColor(color);
+    if (state == _state)
+      _currentStyle._background.setDiffuseColor(color);
+
+  }
+
+  /**
+   * @brief sets the Background Color.
+   * @param r the Color's red part.
+   * @param g the Color's green part.
+   * @param b the Color's blue part.
+   * @param a the Color's alpha part.
+   * @param stateName: the State to setup
+   */
+  void GLGuiWidget::setBackgroundColorS(float r, float g, float b, float a, const std::string& stateName)
+  {
+    OrxGui::State state;
+    if (getState(stateName, &state))
+      this->setBackgroundColor(Color(r,g,b,a), state);
+    else
+      this->setBackgroundColor(Color(r,g,b,a));
+  }
+
+
+  /**
+   * @brief sets the Background Texture for all States.
+   * @param texture the Texture.
+   */
+  void GLGuiWidget::setBackgroundTexture(const Texture& texture)
+  {
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+      setBackgroundTexture(texture, (OrxGui::State)i);
+  }
+
+  /**
+  * @brief sets the Background Texture to all States.
+  * @param textureName the Texture's fileName.
+   */
+  void GLGuiWidget::setBackgroundTexture(const std::string& textureName)
+  {
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+      _style[i]._background.setDiffuseMap(textureName);
+    this->_currentStyle._background.setDiffuseMap(textureName);
+  }
+
+  /**
+   * @brief sets the Background Texture.
+   * @param texture the Texture.
+   * @param state the State to setup.
+   */
+  void GLGuiWidget::setBackgroundTexture(const Texture& texture, OrxGui::State state)
+  {
+    _style[state]._background.setDiffuseMap(texture);
+    if (state == _state)
+      _currentStyle._background.setDiffuseMap(texture);
+  }
+
+
+
+  /**
+   * @brief sets the Background Texture.
+   * @param texture the Texture.
+   * @param stateName the State to setup.
+   */
+  void GLGuiWidget::setBackgroundTexture(const std::string& textureName, const std::string& stateName)
+  {
+    OrxGui::State state;
+    if (getState(stateName, &state))
+      ; /// FIXME this->setBackgroundTexture(textureName, state);
+    else
+      ; ///    this->setBackgroundTexture(textureName);
+  }
+
+
+  /**
+   * @brief sets the Foreground Color for all States.
+   * @param color the Color.
+   */
+  void GLGuiWidget::setForegroundColor(const Color& color)
+  {
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+      setForegroundColor(color, (OrxGui::State)i);
+  }
+
+  /**
+   * @brief sets the Foreground Color.
+   * @param color the Color.
+   * @param state the State to setup
+   */
+  void GLGuiWidget::setForegroundColor(const Color& color, OrxGui::State state)
+  {
+    _style[state]._foreground.setDiffuseColor(color);
+    if (state == _state)
+      _currentStyle._foreground.setDiffuseColor(color);
+
+  }
+
+  /**
+   * @brief sets the Foreground Color.
+   * @param r the Color's red part.
+   * @param g the Color's green part.
+   * @param b the Color's blue part.
+   * @param a the Color's alpha part.
+   * @param stateName: the State to setup
+   */
+  void GLGuiWidget::setForegroundColorS(float r, float g, float b, float a, const std::string& stateName)
+  {
+    OrxGui::State state;
+    if (getState(stateName, &state))
+      this->setForegroundColor(Color(r,g,b,a), state);
+    else
+      this->setForegroundColor(Color(r,g,b,a));
+  }
+
+
+  void GLGuiWidget::loadBackgroundMaterial(const Material& material)
+  {
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+      this->loadForegroundMaterial(material, (OrxGui::State)i);
+  }
+
+  void GLGuiWidget::loadBackgroundMaterial(const Material& material, OrxGui::State state)
+  {
+    this->_style[state]._background = material;
+    if (state == _state)
+      _currentStyle._background = material;
+
+  }
+
+  void GLGuiWidget::loadBackgroundMaterial(const TiXmlElement* element)
+  {
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+      this->loadBackgroundMaterial(element, (OrxGui::State)i);
+  }
+
+  void GLGuiWidget::loadBackgroundMaterial(const TiXmlElement* element, OrxGui::State state)
+  {
+    this->_style[state]._background.loadParams(element);
+    if (state == _state)
+      this->_currentStyle._background = _style[state]._background;
+  }
+
+  void GLGuiWidget::loadBackgroundMaterialS(const TiXmlElement* element, const std::string& stateName)
+  {
+    OrxGui::State state;
+    if (getState(stateName, &state))
+      this->loadBackgroundMaterial(element, state);
+    else
+      this->loadBackgroundMaterial(element);
+  }
+
+  void GLGuiWidget::loadForegroundMaterial(const Material& material)
+{}
+  void GLGuiWidget::loadForegroundMaterial(const Material& material, OrxGui::State state)
+  {}
+  void GLGuiWidget::loadForegroundMaterial(const TiXmlElement* element, OrxGui::State state)
+  {}
+  void GLGuiWidget::loadForegroundMaterialS(const TiXmlElement* element, const std::string& stateName)
+  {}
+
+
+  /**
+   * @brief sets the Feature-Position.
+   * @param featurePosition the Feature-Position.
+   */
+  void GLGuiWidget::setFeaturePosition(FeaturePosition featurePosition)
+  {
+    this->_featurePosition = featurePosition;
+  }
+
+  /**
+   * @brief sets the Feature-Position by converting from a String.
+   * @param featurePosition the Feature-Position.
+   */
+  void GLGuiWidget::setFeaturePositionS(const std::string& featurePosition)
+  {
+    for (unsigned int i = 0; i < 4; ++i)
     {
-      this->_frontColor.slerp(*_toFrontColor, dt*3.0);
-      this->updateFrontColor();
-      if (this->_frontColor.dist(*_toFrontColor) < .1)
+      if (featurePosition == FeaturePositionString[i])
       {
-        delete _toFrontColor;
-        _toFrontColor = NULL;
+        this->setFeaturePosition((FeaturePosition)i);
       }
     }
   }
 
+  /**
+   * @brief sets the Font.
+   * @param font the Font.
+   */
+  void GLGuiWidget::setFont(Font* font)
+  {
+    this->_font = font;
+  }
+
+  /**
+   * @brief sets the font from a Font-Name.
+   * @param fontName the FileName of the Font.
+   */
+  void GLGuiWidget::setFont(const std::string& fontName)
+  {
+    //this->font = new Font(fontName);
+  }
+
+  /**
+   * @brief sets the AnimatedState.
+   * @param animated: it states-changes should animate true, otherwise false.
+   */
+  void GLGuiWidget::setAnimatedStateChanges(bool animated)
+  {
+    this->_animatedStateChanges = animated;
+  }
+
+
+  void GLGuiWidget::switchState(OrxGui::State state)
+  {
+    //this->_currentStyle = this->_style[state];
+    this->_state = state;
+    PRINTF(3)("Switching to state %s\n", OrxGui::StateString[state].c_str());
+
+    this->animateBack();
+  }
+
+
+  void GLGuiWidget::animateBack()
+  {
+    this->_animating = true;
+    this->_animationCycle = 0.0f;
+  }
+
+
+  void GLGuiWidget::tick(float dt)
+  {
+    if (this->_animating)
+    {
+      this->foregroundColor();
+
+      _animationCycle += dt / _animationDuration;
+      if (_animationCycle >= 1.0)
+      {
+        _currentStyle._foreground.diffuseColor() = this->foregroundColor(_state);
+        _currentStyle._background.diffuseColor() = this->backgroundColor(_state);
+        _animating = false;
+      }
+      else
+      {
+        _currentStyle._foreground.diffuseColor().slerp(this->foregroundColor(_state), _animationCycle);
+        _currentStyle._background.diffuseColor().slerp(this->backgroundColor(_state), _animationCycle);
+      }
+      this->updateFrontColor();
+    }
+  }
+
 
   /**
@@ -287,8 +747,82 @@
   void GLGuiWidget::draw() const
   {
-    this->backMaterial().select();
+    this->background().select();
     this->drawRect(this->backRect());
-    this->backMaterial().unselect();
-  }
+    this->background().unselect();
+  }
+
+
+  /**
+   * @param stateName the Name of a State.
+   * @param state the found State is returned here if found.
+   * @returns true if String is found, false otherwise.
+   */
+  bool GLGuiWidget::getState(const std::string& stateName, OrxGui::State* state)
+  {
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+      if (stateName == OrxGui::StateString[i])
+    {
+      *state = (OrxGui::State)i;
+      return true;
+    }
+    return false;
+  }
+
+  /**
+   * @brief print out some nice debug output about the Widget.
+   */
+  void GLGuiWidget::debug() const
+  {
+    PRINT(0)("Debug of %s::%s - WidgetPart ", this->getClassName(), this->getName());
+    if (_parent != NULL)
+      PRINT(0)("- Parent %s::%s ", _parent->getClassName(), _parent->getName());
+    PRINT(0)("- State: %s", StateString[_state].c_str());
+
+    if (_focusable)
+      PRINT(0)("- focusable ");
+    if (_clickable)
+      PRINT(0)("- Clickable ");
+    if (_pushed)
+      PRINT(0)("- Pushed ");
+    PRINT(0)("\n");
+
+
+    PRINT(0)("Minimum Size %0.2f %0.2f ", _minSize.x, _minSize.y);
+    PRINT(0)("Back Rect: ");
+    _backRect.debug();
+    PRINT(0)("Style:\n");
+
+    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
+    {
+      PRINT(0)("In State %s: \n", StateString[i].c_str());
+
+      PRINT(0)("  Borders: Left: %0.2f, Right: %0.2f, Top: %0.2f, Bottom %0.2f\n",
+               _style[i]._borderLeft, _style[i]._borderRight, _style[i]._borderTop, _style[i]._borderBottom);
+      PRINT(0)("  TextSize %0.2f\n", _style[i]._textSize);
+      PRINT(0)("  BackgroundColor: "); _style[i]._background.diffuseColor().debug();
+      PRINT(0)("  ForegroundColor: "); _style[i]._foreground.diffuseColor().debug();
+      PRINT(0)("\n");
+    }
+
+
+    PRINT(0)(" Feature at %s ", FeaturePositionString[_featurePosition].c_str());
+    /// TODO    PRINT(0)("");    Font*               _font;                 //!< The Font used in the current Widget.
+
+    if (_animatedStateChanges)
+      PRINT(0)("- AnimatedStateChanges");
+    PRINT(0)("\n");
+
+    /*
+    if (_animating)
+      PRINT(0)("- Animated ");
+
+    //
+    float               _animationCycle;
+    float               _animationDuration;
+    StatedStyle         _currentStyle;
+    OrxGui::State       _currentState;
+    */
+  }
+
 
 }
Index: trunk/src/lib/gui/gl/glgui_widget.h
===================================================================
--- trunk/src/lib/gui/gl/glgui_widget.h	(revision 8527)
+++ trunk/src/lib/gui/gl/glgui_widget.h	(revision 8619)
@@ -9,5 +9,6 @@
 #include "element_2d.h"
 
-#include "glgui_style.h"
+#include "glgui_defs.h"
+
 #include "material.h"
 #include "rect2D.h"
@@ -15,4 +16,6 @@
 #include "event.h"
 #include "signal_connector.h"
+
+class Font;
 
 namespace OrxGui
@@ -66,35 +69,138 @@
     void disconnect(GLGuiWidget* sender, Signal& signal, BaseObject* receiver);
 
-
-    GLGuiStyle& style() { return this->_style; };
-    const GLGuiStyle style() const { return this->_style; };
-
-    /// MATERIAL (looks)
-    Material& backMaterial() { return this->_backMat; };
-    const Material& backMaterial() const { return this->_backMat; };
+    OrxGui::State state() const { return this->_state; };
+
     Rect2D& backRect() { return this->_backRect; };
     const Rect2D& backRect() const { return this->_backRect; };
 
     void setFrontColor(const Color& frontColor, bool instantaniously = false);
-    const Color& frontColor() const { return this->_frontColor; };
-
-    /** @brief sets all borders to the same value. */
-    void setBorderSize(float borderSize);
-    void setBorderLeft(float borderLeft);
-    void setBorderRight(float borderRight);
-    void setBorderTop(float borderTop);
-    void setBorderBottom(float borderBottom);
-
-    float borderLeft() const { return this->_borderLeft; };
-    float borderRight() const { return this->_borderRight; };
-    float borderTop() const { return this->_borderTop; };
-    float borderBottom() const { return this->_borderBottom; };
-
 
     void setWidgetSize(const Vector2D& size);
     void setWidgetSize(float x, float y);
 
-
-    void setBackgroundColor(float x, float y, float z) { this->backMaterial().setDiffuse(x,y,z); };
+    void animateBack();
+
+    /// STYLE
+    ////////////////////////////////
+    /// Retrieve Current Values. ///
+    ////////////////////////////////
+    /** @returns current left borderWidth */
+    inline float borderLeft() const { return _currentStyle._borderLeft; }
+    /** @returns current right borderWidth */
+    inline float borderRight() const { return _currentStyle._borderRight; }
+    /** @returns current top borderWidth */
+    inline float borderTop() const { return _currentStyle._borderTop; }
+    /** @returns burrent bottom borderWidth */
+    inline float borderBottom() const { return _currentStyle._borderBottom; }
+
+
+    /** @returns current textSize */
+    inline float textSize() const { return _currentStyle._textSize; }
+    /** @returns the Background Color */
+    inline const Color& backgroundColor() const { return _currentStyle._background.diffuseColor(); }
+    /** @returns the current Background Material. */
+    inline const Material& background() const { return _currentStyle._background; }
+    /** @returns the current background Texture. */
+    inline const Texture& backgroundTexture() const { return _currentStyle._background.diffuseTexture(); }
+    /** @returns the current foreground Color */
+    inline const Color& foregroundColor() const { return _currentStyle._foreground.diffuseColor(); }
+    /** @returns the current ForeGroung Material. */
+    inline const Material& foreground() const { return _currentStyle._foreground; }
+
+
+    /** @returns FeaturePosition */
+    inline FeaturePosition featurePosition() const { return _featurePosition; }
+    /** @returns the font */
+    inline const Font* const font() const { return _font; }
+    /** @returns true if the Element is Animated */
+    inline bool animating() const { return _animating; }
+    /** @returns true if State-Changes are animated */
+    inline bool animatedStateChanges() const { return _animatedStateChanges; }
+
+
+    ///////////////////////////////////////////////////////////////
+    /// Retrieve Values for the Saved Values inside the States. ///
+    ///////////////////////////////////////////////////////////////
+    /** @returns left borderWidth @param state the State to retrieve from */
+    inline float borderLeft(OrxGui::State state) const { return _style[state]._borderLeft; }
+    /** @returns right borderWidth @param state the State to retrieve from */
+    inline float borderRight(OrxGui::State state) const { return _style[state]._borderRight; }
+    /** @returns top borderWidth @param state the State to retrieve from */
+    inline float borderTop(OrxGui::State state) const { return _style[state]._borderTop; }
+    /** @returns bottom borderWidth @param state the State to retrieve from */
+    inline float borderBottom(OrxGui::State state) const { return _style[state]._borderBottom; }
+
+    /** @returns textSize @param state the State to retrieve from */
+    inline float textSize(OrxGui::State state) const { return _style[state]._textSize; }
+    /** @returns the Background Color @param state the State to retrieve from */
+    inline const Color& backgroundColor(OrxGui::State state) const { return _style[state]._background.diffuseColor(); }
+    /** @returns the Background Material. @param state the state to retrieve from */
+    inline const Material& background(OrxGui::State state) const { return _style[state]._background; }
+    /** @returns background Texture. @param state the State to retrieve from */
+    inline const Texture& backgroundTexture(OrxGui::State state) const { return _style[state]._background.diffuseTexture(); }
+    /** @returns the foreground Color @param state the State to retrieve from */
+    inline const Color& foregroundColor(OrxGui::State state) const { return _style[state]._foreground.diffuseColor(); }
+    /** @returns the ForeGroung Material. @param state the state to retrieve from */
+    inline const Material& foreground(OrxGui::State state) const { return _style[state]._foreground; }
+
+
+    /// SETUP
+    void resetStyle();
+    void loadParams(const TiXmlElement* root);
+
+    void setBorderLeft(float value);
+    void setBorderLeft(float value, OrxGui::State state);
+    void setBorderLeftS(float value, const std::string& stateName);
+
+    void setBorderRight(float value);
+    void setBorderRight(float value, OrxGui::State state);
+    void setBorderRightS(float value, const std::string& stateName);
+
+    void setBorderTop(float value);
+    void setBorderTop(float value, OrxGui::State state);
+    void setBorderTopS(float value, const std::string& stateName);
+
+    void setBorderBottom(float value);
+    void setBorderBottom(float value, OrxGui::State state);
+    void setBorderBottomS(float value, const std::string& stateName);
+
+    void setTextSize(float value);
+    void setTextSize(float value, OrxGui::State state);
+    void setTextSizeS(float value, const std::string& stateName);
+
+    void setBackgroundColor(const Color& color);
+    void setBackgroundColor(const Color& color, OrxGui::State state);
+    void setBackgroundColorS(float r, float g, float b, float a, const std::string& stateName);
+
+    void setBackgroundTexture(const Texture& texture);
+    void setBackgroundTexture(const std::string& textureName);
+    void setBackgroundTexture(const Texture& texture, OrxGui::State state);
+    void setBackgroundTexture(const std::string& textureName, const std::string& stateName);
+
+    void setForegroundColor(const Color& color);
+    void setForegroundColor(const Color& color, OrxGui::State state);
+    void setForegroundColorS(float r, float g, float b, float a, const std::string& stateName);
+
+    void loadBackgroundMaterial(const Material& material);
+    void loadBackgroundMaterial(const Material& material, OrxGui::State state);
+    void loadBackgroundMaterial(const TiXmlElement* element);
+    void loadBackgroundMaterial(const TiXmlElement* element, OrxGui::State state);
+    void loadBackgroundMaterialS(const TiXmlElement* element, const std::string& stateName);
+
+    void loadForegroundMaterial(const Material& material);
+    void loadForegroundMaterial(const Material& material, OrxGui::State state);
+    void loadForegroundMaterial(const TiXmlElement* element, OrxGui::State state);
+    void loadForegroundMaterialS(const TiXmlElement* element, const std::string& stateName);
+
+    void setFeaturePosition(FeaturePosition featurePosition);
+    void setFeaturePositionS(const std::string& featurePosition);
+
+    void setFont(Font* font);
+    void setFont(const std::string& fontName);
+
+    void setAnimatedStateChanges(bool animated);
+    void switchState(OrxGui::State state);
+
+
 
     inline void drawRect(const Rect2D& rect) const
@@ -116,4 +222,5 @@
     virtual bool processEvent(const Event& event) { return false; };
 
+    bool getState(const std::string& stateName, OrxGui::State* state);
 
   protected:
@@ -137,27 +244,26 @@
     virtual void destroyed();
 
+    virtual void debug() const;
+
   private:
     void init();
 
   private:
+    static GLGuiWidget*            _selected;         //!< The currently selected Widget.
+    static GLGuiWidget*            _focused;          //!< The currently Focused Widget.
+    static GLGuiWidget*            _inputGrabber;     //!< The Widget that grabs input.
+
+
+    /// WIDGET
     GLGuiWidget*                   _parent;           //!< The parent of this Widget.
 
     /// LOOKS
-    Material                       _backMat;
     Rect2D                         _backRect;
-
-    Color                          _frontColor;
-    Color*                         _toFrontColor;
-
-    float                          _borderLeft;
-    float                          _borderRight;
-    float                          _borderTop;
-    float                          _borderBottom;
-
     Vector2D                       _minSize;
 
-    GLGuiStyle                     _style;
 
     /// EVENTS
+    OrxGui::State                  _state;
+
     bool                           _focusable;        //!< If this widget can receive focus.
     bool                           _clickable;        //!< if this widget can be clicked upon.
@@ -166,8 +272,36 @@
 
 
-    static GLGuiWidget*            _selected;         //!< The currently selected Widget.
-    static GLGuiWidget*            _focused;          //!< The currently Focused Widget.
-
-    static GLGuiWidget*            _inputGrabber;     //!< The Widget that grabs input.
+
+    /// STYLE - Variables.
+    typedef struct
+    {
+      float             _borderLeft;           //!< The Distance to the left Border of the widget, before any internal Element starts.
+      float             _borderRight;          //!< The Distance to the right Border of the widget, before any internal Element starts.
+      float             _borderTop;            //!< The Distance to the top Border of the widget, before any internal Element starts
+      float             _borderBottom;         //!< The Distance to the bottom Border of the widget, before any internal Element starts
+
+      float             _textSize;             //!< The TextSize of the Widget.
+
+      Material          _background;           //!< The Background Material of the Widget.
+
+      Material          _foreground;           //!< The foreground Material of the Widget.
+    }
+    StatedStyle;
+
+
+    StatedStyle         _style[GLGUI_STATE_COUNT]; //!< Styles configured for different States
+
+    FeaturePosition     _featurePosition;      //!< The Position a Feature will be layed at (checkbox(box), slider(text),...)
+    Font*               _font;                 //!< The Font used in the current Widget.
+
+
+    /// ANIMATION STUFF:
+    bool                _animatedStateChanges; //!< If the Transitions between States are Animated automatically.
+
+    bool                _animating;            //!< If the Widget is animated at the moment (Texture might be an AnimatedTexture.)
+    float               _animationCycle;
+    float               _animationDuration;
+    StatedStyle         _currentStyle;
+
   };
 }
Index: trunk/src/lib/gui/gl/specials/glgui_notifier.cc
===================================================================
--- trunk/src/lib/gui/gl/specials/glgui_notifier.cc	(revision 8527)
+++ trunk/src/lib/gui/gl/specials/glgui_notifier.cc	(revision 8619)
@@ -25,5 +25,5 @@
 
   /**
-   * standard constructor
+   * @brief standard constructor
    */
   GLGuiNotifier::GLGuiNotifier ()
@@ -34,4 +34,6 @@
     this->lineSpacing = 0;
     this->linesProcessed = 0;
+    this->_fadeAge = 3.0;
+    this->setHideAge(4.0);
 
     this->setDisplayLineCount(10);
@@ -57,30 +59,45 @@
   }
 
+  /**
+   * @brief push a message onto the notifier.
+   * @param message the message to be pushed.
+   *
+   * @note it is not guaranteed, that the message is delivered instantaniously
+   * The possibility may arise, that the DisplayLines are all in use, then one
+   * has to wait until a line gets hidden, until a new one can be pushed to be
+   * displayed.
+   */
   void GLGuiNotifier::pushNotifyMessage(const std::string& message)
   {
     if (!this->hiddenText.empty())
     {
-      printf("%s\n", message.c_str());
-      DisplayLine dl;
+      DisplayLine dl; // put everything in here, and then display it
+
+      // retrieve a Text.
       dl.text = this->hiddenText.top();
-
+      this->hiddenText.pop();
+
+      // setup Text
       dl.text->setBlending(1.0f);
       dl.text->setText(message);
-      this->hiddenText.pop();
+      dl.text->setVisibility(true);
+      dl.text->setRelCoor2D(this->calculateLinePosition(0));
+
       dl.age = 0.0f;
       this->displayLines.push_front(dl);
-
-      dl.text->setVisibility(true);
-      dl.text->setRelCoor2D(this->calculateLinePosition(0));
       this->repositionText();
     }
     else
     {
+      // push it onto the List of messages we still need.
       this->inputBuffer.push_front(message);
-      //printf("grumble... must be fixed\n");
-    }
-  }
-
-
+    }
+  }
+
+
+  /**
+   * @brief sets the Dipsplay Line Count of the Notifier.
+   * @param coun the count of displayLines.
+   */
   void GLGuiNotifier::setDisplayLineCount(unsigned int count)
   {
@@ -96,4 +113,16 @@
   }
 
+  void GLGuiNotifier::setFadeAge(float fadeAge)
+  {
+    this->_fadeAge = fadeAge;
+    this->_transformAge = hideAge() - this->fadeAge();
+  }
+
+  void GLGuiNotifier::setHideAge(float hideAge)
+  {
+    this->_hideAge = hideAge;
+    this->_transformAge = this->hideAge() - fadeAge();
+  }
+
 
   /**
@@ -119,9 +148,9 @@
   void GLGuiNotifier::applyTextSettings(MultiLineText* text)
   {
-    text->setSize(this->style().textSize());
+    text->setSize(this->textSize());
     text->setLineWidth( 300 );
-    text->setFont("fonts/final_frontier.ttf", (int)this->style().textSize());
-
-    text->setColor(this->style().foregroundColor() );
+    text->setFont("fonts/final_frontier.ttf", (int)this->textSize());
+
+    text->setColor(this->foregroundColor() );
     if (text->getParent2D() != this)
       text->setParent2D(this);
@@ -129,4 +158,8 @@
 
 
+  /**
+   * @brief ticks the entire Notifier.
+   * @param dt the time passed since the last Tick
+   */
   void GLGuiNotifier::tick(float dt)
   {
@@ -135,8 +168,8 @@
     {
       (*line).age+=dt;
-      if ((*line).age > 3.0f)
+      if ((*line).age > this->fadeAge())
       {
-        (*line).text->setBlending(4.0 - (*line).age);
-        if ((*line).age > 4.0f)
+        (*line).text->setBlending((hideAge() - (*line).age)/_transformAge);
+        if ((*line).age > hideAge())
         {
           std::list<DisplayLine>::iterator tmp = line;
@@ -167,5 +200,5 @@
     this->beginDraw();
 
-    this->backMaterial().select();
+    this->background().select();
     this->drawRect(this->backRect());
     this->endDraw();
@@ -183,5 +216,5 @@
   Vector2D GLGuiNotifier::calculateLinePosition(unsigned int lineNumber)
   {
-    return Vector2D(0.0f, (float)(this->style().textSize() + this->lineSpacing)*(float)((int)this->bufferDisplaySize - (int)lineNumber - (int)1));
+    return Vector2D(0.0f, (float)(textSize() + this->lineSpacing)*(float)((int)this->bufferDisplaySize - (int)lineNumber - (int)1));
   }
 
Index: trunk/src/lib/gui/gl/specials/glgui_notifier.h
===================================================================
--- trunk/src/lib/gui/gl/specials/glgui_notifier.h	(revision 8527)
+++ trunk/src/lib/gui/gl/specials/glgui_notifier.h	(revision 8619)
@@ -30,6 +30,13 @@
     void pushNotifyMessage(const std::string& message);
 
-    // BUFFERS
+    /// Setup
     void setDisplayLineCount(unsigned int count);
+    void setFadeAge(float fadeAge);
+    void setHideAge(float hideAge);
+
+    /** @returns the beginning of the Hiding process */
+    inline float fadeAge() const { return _fadeAge; };
+    /** @returns at what age elements should be fully hidden */
+    inline float hideAge() const { return _hideAge; };
 
     void clear();
@@ -54,4 +61,5 @@
 
   private:
+    //! structure that defines a Displayed line.
     typedef struct
     {
@@ -59,6 +67,10 @@
       MultiLineText*    text;
 
-    }
-    DisplayLine;
+    } DisplayLine;
+
+
+    float                       _fadeAge;
+    float                       _hideAge;
+    float                       _transformAge;
 
     unsigned int                lineSpacing;            //!< The Spacing between lines.
@@ -72,5 +84,5 @@
 
     unsigned long               linesProcessed;         //!< How many Lines have been processed so far.
-    std::list<std::string>      inputBuffer;            //!<
+    std::list<std::string>      inputBuffer;            //!< The input buffer for lines that were not yet printet out, because there is too much input.
 
   };
Index: trunk/src/lib/math/rect2D.cc
===================================================================
--- trunk/src/lib/math/rect2D.cc	(revision 8527)
+++ trunk/src/lib/math/rect2D.cc	(revision 8619)
@@ -475,2 +475,9 @@
 }
 
+/**
+ * @brief print debug output for the Rect
+ */
+void Rect2D::debug() const
+{
+  PRINT(0)("Top: %0.2f Left: %0.2f; Bottom %0.2f Right:%0.2f; Size: %0.2fx%0.2f\n", top(), left(), bottom(), right(), size().x, size().y);
+}
Index: trunk/src/lib/math/rect2D.h
===================================================================
--- trunk/src/lib/math/rect2D.h	(revision 8527)
+++ trunk/src/lib/math/rect2D.h	(revision 8619)
@@ -127,4 +127,6 @@
   const Rect2D& slerp(const Rect2D& rect, float value);
 
+  void debug() const;
+
 private:
   Vector2D _topLeft;
Index: trunk/src/lib/sound/sound_buffer.cc
===================================================================
--- trunk/src/lib/sound/sound_buffer.cc	(revision 8527)
+++ trunk/src/lib/sound/sound_buffer.cc	(revision 8619)
@@ -114,5 +114,5 @@
     else if (stereo && !is16Bit)
       return AL_FORMAT_STEREO8;
-    else if (stereo && is16Bit)
+    else /* if (stereo && is16Bit) */
       return AL_FORMAT_STEREO16;
   }
Index: trunk/src/lib/util/color.cc
===================================================================
--- trunk/src/lib/util/color.cc	(revision 8527)
+++ trunk/src/lib/util/color.cc	(revision 8619)
@@ -24,4 +24,6 @@
   printf("r:%0.2f g:%0.2f, b:%0.2f, a:%0.2f\n", r(), g(), b(), a());
 }
+
+
 
 /**
Index: trunk/src/lib/util/executor/functor_list.h
===================================================================
--- trunk/src/lib/util/executor/functor_list.h	(revision 8527)
+++ trunk/src/lib/util/executor/functor_list.h	(revision 8619)
@@ -144,3 +144,5 @@
   FUNCTOR_LIST(3)(l_STRING, l_UINT, l_UINT);
 
+  FUNCTOR_LIST(5)(l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT, l_STRING);
+
 #endif /* FUNCTOR_LIST */
Index: trunk/src/lib/util/filesys/file.cc
===================================================================
--- trunk/src/lib/util/filesys/file.cc	(revision 8527)
+++ trunk/src/lib/util/filesys/file.cc	(revision 8619)
@@ -205,5 +205,5 @@
 
 /// FIXME NEXT THREE FUNCTIONS
-bool File::isReadeable() const
+bool File::isReadable() const
 {
 #ifndef __WIN32__
Index: trunk/src/lib/util/filesys/file.h
===================================================================
--- trunk/src/lib/util/filesys/file.h	(revision 8527)
+++ trunk/src/lib/util/filesys/file.h	(revision 8619)
@@ -51,5 +51,5 @@
   bool isFile() const;
   bool isDirectory() const;
-  bool isReadeable() const;
+  bool isReadable() const;
   bool isWriteable() const;
   bool isExecutable() const;
Index: trunk/src/story_entities/simple_game_menu.cc
===================================================================
--- trunk/src/story_entities/simple_game_menu.cc	(revision 8527)
+++ trunk/src/story_entities/simple_game_menu.cc	(revision 8619)
@@ -120,8 +120,18 @@
     OrxGui::GLGuiSlider* slider = new OrxGui::GLGuiSlider();
     slider->connect(SIGNAL(slider, valueChanged), this, SLOT(SimpleGameMenu, TEST));
-    slider->connect(SIGNAL(slider, valueChanged), box, SLOT(OrxGui::GLGuiWidget, setBackgroundColor));
     slider->setRange(0, 1);
     slider->setValue(slider->min());
     box->pack(slider);
+
+
+    OrxGui::GLGuiTable* table = new OrxGui::GLGuiTable(3, 3);
+    std::vector<std::string> headers;
+    headers.push_back("1");
+    headers.push_back("2");
+    headers.push_back("3");
+    table->setHeader(headers);
+
+
+    box->pack(table);
   }
   box->setAbsCoor2D(50, 200);
Index: trunk/src/util/hud.cc
===================================================================
--- trunk/src/util/hud.cc	(revision 8527)
+++ trunk/src/util/hud.cc	(revision 8619)
@@ -89,6 +89,5 @@
   {
     this->energyWidget->show();
-    this->energyWidget->backMaterial().setDiffuseMap("hud_energy_background.png");
-    this->energyWidget->backMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+    this->energyWidget->setBackgroundTexture( "hud_energy_background.png");
     /*    this->energyWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
         this->energyWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/
@@ -143,6 +142,5 @@
       {
         weapon->getEnergyWidget()->show();
-        weapon->getEnergyWidget()->backMaterial().setDiffuse( .8,.2,.11);
-        weapon->getEnergyWidget()->backMaterial().setTransparency(.1);
+        weapon->getEnergyWidget()->setBackgroundColor(Color(.8,.2,.11, 0.1));
         weapon->getEnergyWidget()->setFrontColor(Color( .2,.5,.7,.6));
         //      weapon->getEnergyWidget()->frontMaterial().setTransparency(.6);
Index: trunk/src/world_entities/environments/mapped_water.cc
===================================================================
--- trunk/src/world_entities/environments/mapped_water.cc	(revision 8527)
+++ trunk/src/world_entities/environments/mapped_water.cc	(revision 8619)
@@ -80,5 +80,5 @@
   memset(pTextureReflection, 0, this->textureSize * this->textureSize * channels * sizeof(unsigned int));
   //mat.select();
-  glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(0));
+  glBindTexture(GL_TEXTURE_2D, this->mat.diffuseTextureID(0));
   glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
   glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
@@ -90,5 +90,5 @@
   unsigned int* pTextureRefraction = new unsigned int [this->textureSize * this->textureSize * channels];
   memset(pTextureRefraction, 0, this->textureSize * this->textureSize * channels * sizeof(unsigned int));
-  glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(1));
+  glBindTexture(GL_TEXTURE_2D, this->mat.diffuseTextureID(1));
   glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
   glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
@@ -281,5 +281,5 @@
   ///
 
-  glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(0));
+  glBindTexture(GL_TEXTURE_2D, this->mat.diffuseTextureID(0));
 
   // Create the texture and store it on the video card
@@ -351,5 +351,5 @@
   if(pos.y > waterHeight)
   {
-    double plane[4] = {0.0, -1.0, 0.0, waterHeight}; 
+    double plane[4] = {0.0, -1.0, 0.0, waterHeight};
     glClipPlane(GL_CLIP_PLANE0, plane);
 
@@ -359,5 +359,5 @@
   {
     glCullFace(GL_FRONT);
-    double plane[4] = {0.0, 1.0, 0.0, -waterHeight}; 
+    double plane[4] = {0.0, 1.0, 0.0, -waterHeight};
     glClipPlane(GL_CLIP_PLANE0, plane);
   }
@@ -370,5 +370,5 @@
 
 
-  glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(1));
+  glBindTexture(GL_TEXTURE_2D, this->mat.diffuseTextureID(1));
 
   // Create the texture and store it on the video card
Index: trunk/src/world_entities/skybox.h
===================================================================
--- trunk/src/world_entities/skybox.h	(revision 8527)
+++ trunk/src/world_entities/skybox.h	(revision 8619)
@@ -53,5 +53,5 @@
                            const std::string& posY, const std::string& negZ, const std::string& posZ);
 
-  GLuint getTexture(SKY_SIDE side) const { return (this->material[side]) ? this->material[side]->getDiffuseTexture(): 0; };
+  GLuint getTexture(SKY_SIDE side) const { return (this->material[side]) ? this->material[side]->diffuseTextureID(): 0; };
 
   static void enableCubeMap();
@@ -69,5 +69,5 @@
   float           textureSize;     //!< this is the length of a texture (assumes a square texture)
   std::string     textureName;     //!< Name of the Texture
-  
+
   int textureName_handle;          //!< used to notify about changes of textureName
   int size_handle;                 //!< used to notify about changes of size
