Index: /trunk/Makefile.am
===================================================================
--- /trunk/Makefile.am	(revision 8447)
+++ /trunk/Makefile.am	(revision 8448)
@@ -28,2 +28,6 @@
 include doc/documentation.am
 endif
+
+
+version:
+	echo VERSION: $(PACKAGE_VERSION)
Index: /trunk/configure.ac
===================================================================
--- /trunk/configure.ac	(revision 8447)
+++ /trunk/configure.ac	(revision 8448)
@@ -560,7 +560,7 @@
 #----#
 if test x$osX = xyes ; then
-	PKG_CONFIG_PATH="$prefix"
-	PKG_CHECK_MODULES( QT, QtOpenGL >= 4.01 QtCore >= 4.01 QtGui >= 4.0.1 )
-	QT_INCLUDE_DIR=`$PKG_CONFIG --variable=includedir QtOpenGL QtCore QtGui`
+#	PKG_CONFIG_PATH="$prefix"
+#	PKG_CHECK_MODULES( QT, QtOpenGL >= 4.01 QtCore >= 4.01 QtGui >= 4.0.1 )
+#	QT_INCLUDE_DIR=`$PKG_CONFIG --variable=includedir QtOpenGL QtCore QtGui`
 #----------#
 	    AC_PATH_PROG([QT_MOC], [moc], [no], ["${QT_BIN_DIRECTORY}:${PATH}"])
Index: /trunk/src/lib/event/event_handler.cc
===================================================================
--- /trunk/src/lib/event/event_handler.cc	(revision 8447)
+++ /trunk/src/lib/event/event_handler.cc	(revision 8448)
@@ -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/importer/material.h
===================================================================
--- /trunk/src/lib/graphics/importer/material.h	(revision 8447)
+++ /trunk/src/lib/graphics/importer/material.h	(revision 8448)
@@ -38,4 +38,5 @@
 
     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);
Index: /trunk/src/lib/graphics/text_engine/multi_line_text.cc
===================================================================
--- /trunk/src/lib/graphics/text_engine/multi_line_text.cc	(revision 8447)
+++ /trunk/src/lib/graphics/text_engine/multi_line_text.cc	(revision 8448)
@@ -76,8 +76,8 @@
   glActiveTexture(GL_TEXTURE0);
 
-  glColor4f(this->getColor().x, this->getColor().y, this->getColor().z, this->getBlending());
+  glColor4fv(&this->getColor()[0]);
   glEnable(GL_BLEND);
   glEnable(GL_TEXTURE_2D);
-  glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, GL_MODULATE );
 
Index: /trunk/src/lib/graphics/text_engine/text.cc
===================================================================
--- /trunk/src/lib/graphics/text_engine/text.cc	(revision 8447)
+++ /trunk/src/lib/graphics/text_engine/text.cc	(revision 8448)
@@ -37,5 +37,4 @@
   this->size = textSize;
   this->setSizeY2D(size);
-  this->blending = TEXT_DEFAULT_BLENDING;
   this->color = TEXT_DEFAULT_COLOR;
 
@@ -73,6 +72,5 @@
           this->size == text.size &&
           this->font == text.font &&
-          this->color == text.color &&
-          this->blending == text.blending);
+          this->color == text.color);
 }
 
@@ -95,5 +93,4 @@
 {
   this->size = text.size;
-  this->blending = text.blending;
   this->color = text.color;
   this->setAlignment(text.getAlignment());
@@ -224,5 +221,5 @@
   // drawing this Text.
   // setting the Blending effects
-  glColor4f(this->color.x, this->color.y, this->color.z, this->blending);
+  glColor4fv(&this->color[0]);
 
 
@@ -231,5 +228,5 @@
   glEnable(GL_BLEND);
   glEnable(GL_TEXTURE_2D);
-  glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, GL_MODULATE );
 
@@ -285,5 +282,5 @@
 {
   PRINT(0)("=== TEXT: %s (with Font:'%s')  displaying %s ===\n", this->getName(), this->font->getName(), this->text.c_str());
-  PRINT(0)("Color: %0.2f %0.2f %0.2f\n", this->color.x, this->color.y, this->color.z);
-}
-
+  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 8447)
+++ /trunk/src/lib/graphics/text_engine/text.h	(revision 8448)
@@ -8,4 +8,5 @@
 
 #include "element_2d.h"
+#include "color.h"
 
 #define  TEXT_ALIGN_LEFT             E2D_ALIGN_LEFT
@@ -13,6 +14,5 @@
 #define  TEXT_ALIGN_CENTER           E2D_ALIGN_CENTER
 #define  TEXT_ALIGN_SCREEN_CENTER    E2D_ALIGN_SCREEN_CENTER
-#define  TEXT_DEFAULT_COLOR          Vector(1.0, 1.0, 1.0)      //!< the default Color (white)
-#define  TEXT_DEFAULT_BLENDING       1.0f                       //!< the default blending of the text, (no blending at all)
+#define  TEXT_DEFAULT_COLOR          Color(1.0, 1.0, 1.0, 1.0f) //!< the default Color (white, fully visible)
 
 #define  TEXT_DEFAULT_ALIGNMENT      TEXT_ALIGN_LEFT            //!< default alignment
@@ -44,7 +44,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->blending = 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 = Vector(r, g, b); };
+    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);
 
@@ -57,7 +59,7 @@
     inline const Font* const getFont() const { return this->font; };
     /** @returns the Blending Value [0 invisible 1.0 full visible */
-    inline float getBlending() const { return this->blending; };
+    inline float getBlending() const { return this->color.a(); };
     /** @returns: a Vector(r,g,b) @brief: retrieve a Vector holding the Color of the Text */
-    inline const Vector& getColor() const { return this->color; };
+    inline const Color& getColor() const { return this->color; };
     /** @returns the Size of the Text */
     inline float getSize() const { return this->size; };
@@ -76,6 +78,5 @@
 
     std::string       text;           //!< The text to display
-    Vector            color;          //!< The color of the font.
-    float             blending;       //!< The blending intensity.
+    Color             color;          //!< The color of the font.
     float             size;           //!< The size of the Text.
 };
Index: /trunk/src/lib/gui/gl/glgui_bar.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_bar.cc	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_bar.cc	(revision 8448)
@@ -46,5 +46,5 @@
     this->setClassID(CL_GLGUI_BAR, "GLGuiBar");
 
-    this->frontMaterial().setDiffuse(1,1,1);
+    this->setFrontColor(Color(1,1,1));
 
     this->setSize2D(50, 10);
@@ -64,5 +64,5 @@
     GLGuiWidget::draw();
 
-    this->frontMaterial().select();
+    //this->frontMaterial().select();
     glBegin(GL_QUADS);
 
Index: /trunk/src/lib/gui/gl/glgui_button.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_button.cc	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_button.cc	(revision 8448)
@@ -55,5 +55,5 @@
 
     this->_label.setFont("fonts/final_frontier.ttf", 20);
-    this->frontMaterial().setDiffuse(1, 0, 0);
+    this->_label.setColor(this->frontColor());
 
     this->_label.setParent2D(this);
@@ -69,11 +69,17 @@
 
 
+  void GLGuiButton::updateFrontColor()
+  {
+    this->_label.setColor(this->frontColor());
+  }
 
   void GLGuiButton::clicking(const Vector2D& pos)
   {
+    GLGuiWidget::clicking(pos);
     emit(clicked());
   }
   void GLGuiButton::releasing(const Vector2D& pos)
   {
+    GLGuiWidget::releasing(pos);
     emit(released());
   }
Index: /trunk/src/lib/gui/gl/glgui_button.h
===================================================================
--- /trunk/src/lib/gui/gl/glgui_button.h	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_button.h	(revision 8448)
@@ -41,8 +41,10 @@
       virtual void draw() const;
 
+      DeclareSignal0(clicked);
       DeclareSignal0(released);
-      DeclareSignal0(clicked);
 
     protected:
+      virtual void updateFrontColor();
+
       virtual void clicking(const Vector2D& pos);
       virtual void releasing(const Vector2D& pos);
Index: /trunk/src/lib/gui/gl/glgui_checkbutton.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_checkbutton.cc	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_checkbutton.cc	(revision 8448)
@@ -65,9 +65,14 @@
   void GLGuiCheckButton::resize()
   {
-    this->labelText().setRelCoor2D(borderLeft() + 25, borderTop() + 5);
-    this->setSize2D(this->labelText().getSizeX2D() + 30 + borderLeft() + borderRight(), this->labelText().getSizeY2D() + 10 + borderTop()+borderBottom());
+
+    this->labelText().setRelCoor2D( borderLeft() + 15.0, borderTop() + 5);
+    this->setSize2D(this->labelText().getSizeX2D() + 15.0 + borderLeft() + borderRight(), this->labelText().getSizeY2D() + 10 + borderTop()+borderBottom());
     GLGuiWidget::resize();
-    this->frontRect().setTopLeft(borderLeft(), borderTop());
-    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()) , this->getSizeY2D() - (borderTop() + borderBottom()));
+
+    this->_checkBox.setSize(10.0, 10.0);
+    this->_checkBox.setCenter( borderLeft() + _checkBox.height()/2.0, borderTop() + (this->getSizeY2D() - borderTop() - borderBottom()) / 2.0);
+
+/*    this->frontRect().setTopLeft(borderLeft(), borderTop());
+    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()) , this->getSizeY2D() - (borderTop() + borderBottom()));*/
   }
 
@@ -89,44 +94,36 @@
     GLGuiButton::draw();
 
-    this->frontMaterial().select();
-    this->drawRect(this->frontRect());
+//     this->frontMaterial().select();
+//     this->drawRect(this->frontRect());
 
     if (this->bActive)
     {
-      glBegin(GL_QUADS);
-      glColor3f( 1, 1 ,1);
-      glTexCoord2i(0,0); glVertex2d(borderLeft()+8, borderTop()+8);
-      glTexCoord2i(0,1); glVertex2d(borderLeft() + 8, this->getSizeY2D()-8 - (borderTop() + borderBottom()));
-      glTexCoord2i(1,1); glVertex2d(this->getSizeY2D()-8 +borderLeft(), this->getSizeY2D()-8- (borderTop() + borderBottom()));
-      glTexCoord2i(1,0); glVertex2d(this->getSizeY2D()-8 +borderLeft(), borderTop()+8);
-      glEnd();
+      glColor3fv( &this->frontColor()[0]);
+      this->drawRect(this->_checkBox);
 
 
       // DRAW a cross :)
-      glColor3f(0,0,0);
+      Vector2D center = this->_checkBox.center();
+      glColor4f(1,1,1, 1.0);
       glLineWidth(3.0);
+
       glBegin(GL_LINE_LOOP);
-      glVertex2d(borderLeft()+8,borderTop() +8);
-      glVertex2d(this->getSizeY2D()/2 + borderLeft(), this->getSizeY2D()/2 - 1);
+      glVertex2d(_checkBox.left(), _checkBox.top());
+      glVertex2d(center.x, center.y);
 
-      glVertex2d(this->getSizeY2D()-8 + borderLeft(), borderTop()+8);
-      glVertex2d(this->getSizeY2D()/2 +1 + borderLeft(), this->getSizeY2D()/2);
+      glVertex2d(_checkBox.right(), _checkBox.top());
+      glVertex2d(center.x, center.y);
 
-      glVertex2d(this->getSizeY2D()-8 + borderLeft(), this->getSizeY2D()-8- (borderTop() + borderBottom()));
-      glVertex2d(this->getSizeY2D()/2 + borderLeft(), this->getSizeY2D()/2+1);
+      glVertex2d(_checkBox.right(), _checkBox.bottom());
+      glVertex2d(center.x, center.y);
 
-      glVertex2d(borderLeft() + 8, this->getSizeY2D()-8 - (borderTop() + borderBottom()));
-      glVertex2d(this->getSizeY2D()/2 -1 + borderLeft(), this->getSizeY2D()/2);
+      glVertex2d(_checkBox.left(), _checkBox.bottom());
+      glVertex2d(center.x, center.y);
       glEnd();
     }
     else
     {
-      glBegin(GL_QUADS);
-      glColor3f(0, 0, 0);
-      glTexCoord2i(0,0); glVertex2d(borderLeft()+8, borderTop()+8);
-      glTexCoord2i(0,1); glVertex2d(borderLeft()+ 8, this->getSizeY2D()-8 - (borderTop() + borderBottom()));
-      glTexCoord2i(1,1); glVertex2d(this->getSizeY2D()-8 +borderLeft(), this->getSizeY2D()-8- (borderTop() + borderBottom()));
-      glTexCoord2i(1,0); glVertex2d(this->getSizeY2D()-8 +borderLeft(), borderTop()+8);
-      glEnd();
+      glColor3fv( &this->frontColor()[0]);
+      this->drawRect(this->_checkBox);
     }
 
Index: /trunk/src/lib/gui/gl/glgui_checkbutton.h
===================================================================
--- /trunk/src/lib/gui/gl/glgui_checkbutton.h	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_checkbutton.h	(revision 8448)
@@ -46,5 +46,5 @@
   private:
     bool             bActive;
-
+    Rect2D           _checkBox;
   };
 }
Index: /trunk/src/lib/gui/gl/glgui_defs.h
===================================================================
--- /trunk/src/lib/gui/gl/glgui_defs.h	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_defs.h	(revision 8448)
@@ -7,12 +7,61 @@
 #define _GLGUI_DEFS_H
 
+#include <string>
+
 /// TODO MOVE TO ORXGUI_TYPES
 namespace OrxGui
 {
+  //! if the Element should be visible by default.
+#define GLGUI_WIDGET_DEFAULT_VISIBLE       false
+
+
   //! An enumeration for the Orientation of an Element.
   typedef enum {
-    Horizontal,    //!< Horizontal Orientation.
-    Vertical       //!< Vertical Orientation.
+    Horizontal,       //!< Horizontal Orientation.
+    Vertical          //!< Vertical Orientation.
   } Orientation;
+
+  const std::string OrientationString[] = {
+    "Horizontal",
+    "Vertical"
+  };
+
+  //! An enumerator that defines the different states Widgets may be in.
+  typedef enum {
+    Normal,           //!< Normal state of the GUI's Widgets.
+    Active,           //!< If the widget is Active.
+    Selected,         //!< If the Widget is Selected.
+    Insensitive       //!< If the Widget is insensitive.
+  } State;
+  //! The count of States a GUI-Element can be in.
+#define GLGUI_STATE_COUNT   4
+#define GLGUI_DEFAULT_STYLE OrxGui::Normal
+
+  const std::string StateString[] =
+    {
+      "Normal",
+      "Active",
+      "Selected",
+      "Insensitive"
+    };
+
+    //! Where a Certain feature will be positioned at.
+    typedef enum {
+      FeatureLeft,          //!< On the Left side.
+      FeatureRight,         //!< On the Right side.
+      FeatureTop,           //!< On Top of the rest of the Widget.
+      FeatureBottom,        //!< At the Bottom of the rest of the Widget.
+    } FeaturePosition;
+
+    const std::string FeaturePositionString[] =
+    {
+      "Left",
+      "Right",
+      "Top",
+      "Bottom"
+    };
+
+
+
 };
 
Index: /trunk/src/lib/gui/gl/glgui_handler.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_handler.cc	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_handler.cc	(revision 8448)
@@ -40,5 +40,5 @@
 
 
-    EventHandler::getInstance()->withUNICODE(ES_ALL, true );
+    EventHandler::getInstance()->withUNICODE(ES_MENU, true );
 
     this->_cursor = NULL;
Index: /trunk/src/lib/gui/gl/glgui_image.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_image.cc	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_image.cc	(revision 8448)
@@ -17,4 +17,6 @@
 
 #include "glgui_image.h"
+
+#include "debug.h"
 
 namespace OrxGui
@@ -45,6 +47,5 @@
     this->setClassID(CL_GLGUI_IMAGE, "GLGuiImage");
 
-    this->frontMaterial().setDiffuseMap(this->texture);
-    this->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+    this->_imageMaterial.setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
     this->resize();
@@ -54,27 +55,32 @@
   void GLGuiImage::loadImageFromTexture(const Texture& texture)
   {
-    this->frontMaterial().setDiffuseMap(texture);
-    this->frontMaterial().setDiffuse(1,1,1);
+    this->_imageMaterial.setDiffuseMap(texture);
   }
 
   void GLGuiImage::loadImageFromFile(const std::string& fileName)
   {
-    this->texture.loadImage(fileName);
+    this->_imageMaterial.setDiffuseMap(fileName);
   }
 
   void GLGuiImage::loadImageFromSDLSurface(SDL_Surface* surface)
   {
-    //this->texture.loadSurface(surface);
+    this->_imageMaterial.setDiffuseMap(Texture(surface));
   }
 
   void GLGuiImage::loadImageFromDisplayList(GLuint texture)
   {
-//    this->texture.setTexture(texture);
+    PRINTF(2)("SORRY NOT IMPLEMENTED\n");
+//    this->_imageMaterial.setTexture(texture);
+  }
+
+  void GLGuiImage::updateFrontColor()
+  {
+    this->_imageMaterial.setDiffuseColor(this->frontColor());
   }
 
   void GLGuiImage::resize()
   {
-    this->frontRect().setTopLeft(this->borderLeft(), this->borderTop());
-    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()), this->getSizeY2D() - (borderTop() + borderBottom()) );
+    this->_imagePlane.setTopLeft(this->borderLeft(), this->borderTop());
+    this->_imagePlane.setSize(this->getSizeX2D() - (borderLeft() + borderRight()), this->getSizeY2D() - (borderTop() + borderBottom()) );
     GLGuiWidget::resize();
   }
@@ -89,6 +95,6 @@
     GLGuiWidget::draw();
 
-    this->frontMaterial().select();
-    this->drawRect(this->frontRect());
+    this->_imageMaterial.select();
+    this->drawRect(this->_imagePlane);
     this->endDraw();
   }
Index: /trunk/src/lib/gui/gl/glgui_image.h
===================================================================
--- /trunk/src/lib/gui/gl/glgui_image.h	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_image.h	(revision 8448)
@@ -36,10 +36,15 @@
     DeclareSignal0(imageChanged);
 
+  protected:
+    virtual void updateFrontColor();
+    virtual void resize();
+
+
   private:
     void init();
-    virtual void resize();
 
   private:
-    Texture       texture;
+    Rect2D        _imagePlane;
+    Material      _imageMaterial;
   };
 }
Index: /trunk/src/lib/gui/gl/glgui_inputline.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_inputline.cc	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_inputline.cc	(revision 8448)
@@ -22,5 +22,5 @@
   /**
    * @brief standard constructor
-  */
+   */
   GLGuiInputLine::GLGuiInputLine ()
   {
@@ -48,8 +48,9 @@
     this->setFocusable(true);
 
-    this->text.setParent2D(this);
-    this->text.setRelCoor2D(4,4);
-    this->text.setFont("fonts/final_frontier.ttf", 20);
-    this->text.setVisibility(false);
+    this->_text.setParent2D(this);
+    this->_text.setRelCoor2D(4,4);
+    this->_text.setFont("fonts/final_frontier.ttf", 20);
+    this->_text.setColor(this->frontColor());
+    this->_text.setVisibility(false);
     this->resize();
 
@@ -63,8 +64,6 @@
   void GLGuiInputLine::setText(const std::string& text)
   {
-    this->text.setText(text);
-    this->resize();
-
-    emit(this->textChanged(this->getText()));
+    this->_text.setText(text);
+    this->changedText();
   }
 
@@ -75,7 +74,6 @@
   void GLGuiInputLine::append(const std::string& appendText)
   {
-    this->text.append(appendText);
-    this->resize();
-    emit(this->textChanged(this->text.getText()));
+    this->_text.append(appendText);
+    this->changedText();
   }
 
@@ -87,7 +85,6 @@
   void GLGuiInputLine::appendCharacter(char character)
   {
-    this->text.appendCharacter(character);
-    this->resize();
-    emit(this->textChanged(this->text.getText()));
+    this->_text.appendCharacter(character);
+    this->changedText();
   }
 
@@ -99,7 +96,19 @@
   void GLGuiInputLine::removeCharacters(unsigned int chars)
   {
-    this->text.removeCharacters(chars);
+    this->_text.removeCharacters(chars);
+    this->changedText();
+  }
+
+  /**
+   * @brief If the Text has been changed this function is called.
+   *
+   * This Function also emits the Signal textChanged.
+   */
+  void GLGuiInputLine::changedText()
+  {
     this->resize();
-    emit(this->textChanged(this->text.getText()));
+    this->setFrontColor(Color(1,1,1,1), true);
+    this->setFrontColor(Color(0,1,0,1));
+    emit(this->textChanged(this->_text.getText()));
   }
 
@@ -117,5 +126,5 @@
 
   /**
-   * Processes an Event.
+   * @brief Processes an Event.
    * @param event The event to be processed
    * @return true if the event was catched.
@@ -154,5 +163,4 @@
       }
     }
-
     return false;
   }
@@ -164,29 +172,33 @@
   void GLGuiInputLine::resize()
   {
-    this->text.setRelCoor2D(this->borderLeft() + 2.0,this->borderTop() + 2.0);
-    this->setSize2D( this->text.getSize2D() + Vector2D(borderLeft() + borderRight() + 4.0, borderTop() + borderBottom() + 4.0));
+    this->_text.setRelCoor2D(this->borderLeft(), this->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());
+  }
 
   void GLGuiInputLine::hiding()
   {
-    this->text.setVisibility(false);
+    this->_text.setVisibility(false);
   }
 
   void GLGuiInputLine::showing()
   {
-    this->text.setVisibility(true);
-  }
-
-
-  /**
-   * ticks the InputLine
+    this->_text.setVisibility(true);
+  }
+
+  /**
+   * @brief ticks the InputLine
    * @param dt the time passed.
    */
   void GLGuiInputLine::tick(float dt)
   {
+    GLGuiWidget::tick(dt);
     if (this->delayNext > 0.0)
       this->delayNext -= dt;
@@ -218,6 +230,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 8447)
+++ /trunk/src/lib/gui/gl/glgui_inputline.h	(revision 8448)
@@ -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.getText(); };
 
     void setText(const std::string& text);
@@ -48,12 +48,17 @@
     DeclareSignal1(textChanged, const std::string&);
 
+  protected:
+    virtual void updateFrontColor();
+    virtual void hiding();
+    virtual void showing();
+    virtual void resize();
+
+
   private:
     void init();
-    void resize();
-    virtual void hiding();
-    virtual void showing();
+    void changedText();
 
   private:
-    Text                    text;             //!< The Text to display inside of the InputLine.
+    Text                    _text;            //!< The Text to display inside of the InputLine.
 
     Uint16                  pressedKey;       //!< the pressed key that will be repeated.
Index: /trunk/src/lib/gui/gl/glgui_pushbutton.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_pushbutton.cc	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_pushbutton.cc	(revision 8448)
@@ -45,10 +45,10 @@
   void GLGuiPushButton::resize()
   {
-    this->labelText().setRelCoor2D(borderLeft() + 5, borderTop() + 5);
-    this->setSize2D(this->labelText().getSizeX2D() + 10 + borderLeft()+borderRight(), this->labelText().getSizeY2D() + 10 + borderTop() + borderBottom() );
+    this->labelText().setRelCoor2D(borderLeft(), borderTop());
+    this->setSize2D(this->labelText().getSizeX2D() + borderLeft() + borderRight(), this->labelText().getSizeY2D() + borderTop() + borderBottom() );
 
     GLGuiWidget::resize();
-    this->frontRect().setTopLeft(borderLeft(), borderTop());
-    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()), this->getSizeY2D() - (borderTop() + borderBottom()));
+/*    this->frontRect().setTopLeft(borderLeft(), borderTop());
+    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()), this->getSizeY2D() - (borderTop() + borderBottom()));*/
   }
 
@@ -97,9 +97,5 @@
     GLGuiButton::draw();
 
-    this->frontMaterial().select();
-    this->drawRect(this->frontRect());
     this->endDraw();
-    //   this->label->draw();
-    //  printf("test");
   }
 
Index: /trunk/src/lib/gui/gl/glgui_slider.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_slider.cc	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_slider.cc	(revision 8448)
@@ -74,4 +74,6 @@
     else
       this->_value = value;
+    this->_handle.setCenter(this->sliderPosition(), this->borderTop() + (this->getSizeY2D() - this->borderTop() - borderBottom()) / 2.0);
+
     emit(valueChanged(this->_value));
   }
@@ -161,6 +163,14 @@
   {
     GLGuiWidget::resize();
-    this->frontRect().setTopLeft(this->borderLeft(), this->getSizeY2D()/2.0 - 2.0);
-    this->frontRect().setSize(this->getSizeX2D() - borderLeft() - borderRight(), 4.0);
+//    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.setSize(this->getSizeX2D() - borderLeft() - borderRight(), 4.0);
+    this->_handle.setSize(this->_sliderWidth, this->getSizeY2D() - borderTop() - borderBottom());
+  }
+
+  void GLGuiSlider::updateFrontColor()
+  {
+
   }
 
@@ -218,4 +228,5 @@
   void GLGuiSlider::tick(float dt)
   {
+    GLGuiWidget::tick(dt);
   }
 
@@ -228,8 +239,8 @@
     GLGuiWidget::draw();
 
-    this->frontMaterial().select();
-    this->drawRect(this->frontRect());
-
-    this->drawRect(Rect2D(this->sliderPosition()-_sliderWidth/2.0, 0*this->borderTop(), _sliderWidth, this->getSizeY2D() - (borderTop() + borderBottom()) ));
+    glColor4fv(&this->frontColor()[0]);
+    this->drawRect(this->_slider);
+    this->drawRect(this->_handle);
+    //this->drawRect(Rect2D(this->sliderPosition()-_sliderWidth/2.0, 0*this->borderTop(), _sliderWidth, this->getSizeY2D() - (borderTop() + borderBottom()) ));
 
     this->endDraw();
Index: /trunk/src/lib/gui/gl/glgui_slider.h
===================================================================
--- /trunk/src/lib/gui/gl/glgui_slider.h	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_slider.h	(revision 8448)
@@ -56,4 +56,5 @@
   protected:
     virtual void resize();
+    virtual void updateFrontColor();
 
     virtual void clicking(const Vector2D& pos);
@@ -68,4 +69,7 @@
   private:
     Orientation      orientation;
+
+    Rect2D           _slider;
+    Rect2D           _handle;
 
     float            _maxValue;
Index: /trunk/src/lib/gui/gl/glgui_style.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_style.cc	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_style.cc	(revision 8448)
@@ -18,4 +18,6 @@
 #include "glgui_style.h"
 
+#include "loading/load_param.h"
+
 namespace OrxGui
 {
@@ -25,6 +27,10 @@
    * @brief standard constructor
   */
-  GLGuiStyle::GLGuiStyle ()
+  GLGuiStyle::GLGuiStyle (const TiXmlElement* root)
   {
+    if (root != NULL)
+      this->loadParams(root);
+
+    this->
   }
 
@@ -37,3 +43,145 @@
     // delete what has to be deleted here
   }
+
+  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)
+{}
+
+  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)
+{}
+
+  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)
+{}
+
+  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)
+{}
+
+  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)
+{}
+
+  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)
+{}
+
+  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)
+{}
+
+  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)
+  {}
+
+  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::animatedStateChanges(bool animated)
+  {
+    this->_animatedStateChanges = animated;
+  }
+
 }
Index: /trunk/src/lib/gui/gl/glgui_style.h
===================================================================
--- /trunk/src/lib/gui/gl/glgui_style.h	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_style.h	(revision 8448)
@@ -7,9 +7,11 @@
 #define _GLGUI_STYLE_H
 
-// FORWARD DECLARATION
+#include "glgui_defs.h"
 
 #include "font.h"
 #include "texture.h"
 #include "color.h"
+
+class TiXmlElement;
 
 namespace OrxGui
@@ -19,39 +21,96 @@
   {
   public:
+    GLGuiStyle(const TiXmlElement* root = NULL);
+    virtual ~GLGuiStyle();
 
-    //! Where a Certain feature will be positioned at.
-    typedef enum {
-      FeatureLeft,          //!< On the Left side.
-      FeatureRight,         //!< On the Right side.
-      FeatureTop,           //!< On Top of the rest of the Widget.
-      FeatureBottom,        //!< At the Bottom of the rest of the Widget.
-    } FeaturePosition;
+
+    /// 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; }
 
 
 
-  public:
-    GLGuiStyle();
-    virtual ~GLGuiStyle();
+    /// SETUP
+    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 animatedStateChanges(bool animated);
 
   private:
-    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
+    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
 
-    Font*             _font;                 //!< The Font used in the current Widget.
-    float             _textSize;             //!< The TextSize of the Widget.
-    float             _textColor;            //!< The TextColor of the Widget.
+      float             _textSize;             //!< The TextSize of the Widget.
 
-    float             _backgroundColor;      //!< The BackgroundColor of the Widget.
-    Texture           _backgorundTexture;    //!< The BackgroundTexture of the Widget.
+      Color             _backgroundColor;      //!< The BackgroundColor of the Widget.
+      Texture           _backgroundTexture;    //!< The BackgroundTexture of the Widget.
 
-    float             _foregroundColor;      //!< The foregroundColor of the Widget.
-    Texture           _foregorundTexture;    //!< The ForegroundTexture of the Widget
+      Color             _foregroundColor;      //!< The foregroundColor of the Widget.
+    }
+    StatedStyle;
 
-    FeaturePosition   _featurePosition;      //!< The Position a Feature will be layed at (checkbox(box), slider(text),...)
 
-    bool              _animated;             //!< If the Widget is animated (Texture might be an AnimatedTexture.)
-    bool              _animatedStateChanges; //!< If the Transitions between States are Animated automatically.
+    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.
   };
 }
Index: /trunk/src/lib/gui/gl/glgui_textfield.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_textfield.cc	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_textfield.cc	(revision 8448)
@@ -53,6 +53,6 @@
     GLGuiWidget::draw();
 
-    this->frontMaterial().select();
-    this->drawRect(this->frontRect());
+/*    this->frontMaterial().select();
+    this->drawRect(this->frontRect());*/
     this->endDraw();
   }
Index: /trunk/src/lib/gui/gl/glgui_widget.cc
===================================================================
--- /trunk/src/lib/gui/gl/glgui_widget.cc	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_widget.cc	(revision 8448)
@@ -45,4 +45,7 @@
     if (this == GLGuiWidget::_focused)
       GLGuiWidget::_focused = NULL;
+
+    if (this->_toFrontColor)
+      delete this->_toFrontColor;
   }
 
@@ -66,8 +69,11 @@
     this->setVisibility(GLGUI_WIDGET_DEFAULT_VISIBLE);
 
-    this->_backMat.setDiffuse(1.0, 1.0, 1.0);
-    this->_frontMat.setDiffuse(1.0, 0.0, 0.0);
-
-    this->_borderLeft = 1.0;
+    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;
@@ -115,4 +121,23 @@
   }
 
+  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();
+  };
+
 
   void GLGuiWidget::setBorderSize(float borderSize)
@@ -176,5 +201,5 @@
   void GLGuiWidget::clicking(const Vector2D& pos)
   {
-    this->frontMaterial().setDiffuse(0, 0, 1);
+    this->setFrontColor(Color(0, 0, 1));
 
   }
@@ -182,5 +207,5 @@
   void GLGuiWidget::releasing(const Vector2D& pos)
   {
-    this->frontMaterial().setDiffuse(0,1,0);
+    this->setFrontColor(Color(0,1,0));
 
   }
@@ -188,10 +213,10 @@
   void GLGuiWidget::receivedFocus()
   {
-    this->frontMaterial().setDiffuse(0, 1, 0);
+    this->setFrontColor(Color(0, 1, 0));
   }
 
   void GLGuiWidget::removedFocus()
   {
-    this->frontMaterial().setDiffuse(1, 0, 0);
+    this->setFrontColor(Color(1, 0, 0));
 
   }
@@ -201,4 +226,5 @@
   ;
 
+
   void GLGuiWidget::setWidgetSize(const Vector2D& size)
   {
@@ -239,4 +265,18 @@
     this->setVisibility(false);
     this->hiding();
+  }
+
+  void GLGuiWidget::tick(float dt)
+  {
+    if (this->_toFrontColor)
+    {
+      this->_frontColor.slerp(*_toFrontColor, dt*3.0);
+      this->updateFrontColor();
+      if (this->_frontColor.dist(*_toFrontColor) < .1)
+      {
+        delete _toFrontColor;
+        _toFrontColor = NULL;
+      }
+    }
   }
 
@@ -249,4 +289,5 @@
     this->backMaterial().select();
     this->drawRect(this->backRect());
+    this->backMaterial().unselect();
   }
 
Index: /trunk/src/lib/gui/gl/glgui_widget.h
===================================================================
--- /trunk/src/lib/gui/gl/glgui_widget.h	(revision 8447)
+++ /trunk/src/lib/gui/gl/glgui_widget.h	(revision 8448)
@@ -8,17 +8,11 @@
 
 #include "element_2d.h"
+
+#include "glgui_style.h"
+#include "material.h"
 #include "rect2D.h"
-
-#include "material.h"
 
 #include "event.h"
 #include "signal_connector.h"
-
-#include "glincl.h"
-
-#include <vector>
-
-// FORWARD DECLARATION
-class Material;
 
 namespace OrxGui
@@ -27,6 +21,4 @@
   class GLGuiCursor;
 
-  //! if the Element should be visible by default.
-#define GLGUI_WIDGET_DEFAULT_VISIBLE       false
 
   //! This is widget part of the openglGUI class
@@ -35,16 +27,5 @@
    */
   class GLGuiWidget : public Element2D
-{
-  public:
-  //! An enumerator that defines the different states Widgets may be in.
-  typedef enum {
-    Normal,           //!< Normal state of the GUI's Widgets.
-    Active,           //!< If the widget is Active.
-    Selected,         //!< If the Widget is Selected.
-    Insensitive       //!< If the Widget is insensitive.
-  } State;
-
-
-
+  {
   public:
     GLGuiWidget(GLGuiWidget* parent = NULL);
@@ -92,8 +73,6 @@
     const Rect2D& backRect() const { return this->_backRect; };
 
-    Material& frontMaterial() { return this->_frontMat; };
-    const Material& frontMaterial() const { return this->_frontMat; };
-    Rect2D& frontRect() { return this->_frontRect; };
-    const Rect2D& frontRect() const { return this->_frontRect; };
+    void setFrontColor(const Color& frontColor, bool instantaniously = false);
+    const Color& frontColor() const { return this->_frontColor; };
 
     /** @brief sets all borders to the same value. */
@@ -116,5 +95,6 @@
     void setBackgroundColor(float x, float y, float z) { this->backMaterial().setDiffuse(x,y,z); };
 
-    inline void drawRect(const Rect2D& rect) const {
+    inline void drawRect(const Rect2D& rect) const
+    {
       glBegin(GL_QUADS);
       glTexCoord2i(0,0); glVertex2d(rect.left(), rect.top());
@@ -127,4 +107,5 @@
 
     virtual void update() {};
+    virtual void tick(float dt);
     virtual void draw() const;
 
@@ -132,6 +113,6 @@
     virtual bool processEvent(const Event& event) { return false; };
 
+
   protected:
-
     /// LOOKS
     virtual void resize();
@@ -139,4 +120,10 @@
     virtual void hiding() {};
     virtual void showing() {};
+    virtual void updateFrontColor() {};
+
+    inline void beginDraw() const { glPushMatrix(); glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0); };
+    inline void endDraw() const { glPopMatrix(); };
+
+    /// EVENTS
     // if something was clickt on the GUI-widget.
     virtual void clicking(const Vector2D& pos);
@@ -147,11 +134,6 @@
     virtual void destroyed();
 
-
-    inline void beginDraw() const { glPushMatrix(); glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0); };
-    inline void endDraw() const { glPopMatrix(); };
-
   private:
     void init();
-
 
   private:
@@ -162,6 +144,6 @@
     Rect2D                         _backRect;
 
-    Material                       _frontMat;
-    Rect2D                         _frontRect;
+    Color                          _frontColor;
+    Color*                         _toFrontColor;
 
     float                          _borderLeft;
@@ -171,4 +153,6 @@
 
     Vector2D                       _minSize;
+
+    GLGuiStyle                     _style;
 
     /// EVENTS
Index: /trunk/src/lib/math/rect2D.cc
===================================================================
--- /trunk/src/lib/math/rect2D.cc	(revision 8447)
+++ /trunk/src/lib/math/rect2D.cc	(revision 8448)
@@ -232,4 +232,35 @@
 
 /**
+ * @brief sets the new Center
+ * @param x the center's X to move the Rectangle to.
+ * @param y the center's Y to move the Rectangle to.
+ * moves the Rectangle from its current center to the new Center
+ */
+void Rect2D::setCenter(float x, float y)
+{
+  this->setCenter(Vector2D(x, y));
+}
+
+/**
+ * @brief sets the new Center
+ * @param center the center to move the Rectangle to.
+ * moves the Rectangle from its current center to the new Center
+ */
+void Rect2D::setCenterX(float x)
+{
+#warning implement this
+}
+
+/**
+ * @brief sets the new Center
+ * @param center the center to move the Rectangle to.
+ * moves the Rectangle from its current center to the new Center
+ */
+void Rect2D::setCenterY(float y)
+{
+#warning implement this
+}
+
+/**
  * @brief scales the Rectangle from topLeft out.
  * @param x: the scale factor in x direction
Index: /trunk/src/lib/math/rect2D.h
===================================================================
--- /trunk/src/lib/math/rect2D.h	(revision 8447)
+++ /trunk/src/lib/math/rect2D.h	(revision 8448)
@@ -96,4 +96,8 @@
   void setSize(const Vector2D& size);
   void setCenter(const Vector2D& center);
+  void setCenter(float x, float y);
+  void setCenterX(float x);
+  void setCenterY(float y);
+
 
   void scaleX(float x);
Index: /trunk/src/lib/util/color.cc
===================================================================
--- /trunk/src/lib/util/color.cc	(revision 8447)
+++ /trunk/src/lib/util/color.cc	(revision 8448)
@@ -18,4 +18,10 @@
 #include "color.h"
 #include <stdio.h>
+
+
+void Color::debug() const
+{
+  printf("r:%0.2f g:%0.2f, b:%0.2f, a:%0.2f\n", r(), g(), b(), a());
+}
 
 /**
Index: /trunk/src/lib/util/color.h
===================================================================
--- /trunk/src/lib/util/color.h	(revision 8447)
+++ /trunk/src/lib/util/color.h	(revision 8448)
@@ -16,19 +16,39 @@
 {
 public:
-  Color(float r = 0.0f, float g = 0.0f, float b = 0.0f, float a = 0.0f) { _rgba[0] = r; _rgba[1] = g; _rgba[2] = b; _rgba[3] = a; };
+  Color(float r = 0.0f, float g = 0.0f, float b = 0.0f, float a = 1.0f) { _rgba[0] = r; _rgba[1] = g; _rgba[2] = b; _rgba[3] = a; };
   Color(const Color& c) { _rgba[0] = c.r(); _rgba[1] = c.g(); _rgba[2] = c.b(); _rgba[3] = c.a(); }
 
-  float& operator[](unsigned int i) { return _rgba[i]; }
-  const float& operator[](unsigned int i) const { return _rgba[i]; }
+  inline const Color& operator=(const Color& c) { _rgba[0] = c.r(); _rgba[1] = c.g(); _rgba[2] = c.b(); _rgba[3] = c.a(); return *this; };
+  inline bool operator==(const Color& c) const { return (r() == c.r() && g() == c.g() && b() == c.b() && a() == c.a()); };
 
-  float r() const { return _rgba[0]; }
-  float& r() { return _rgba[0]; }
-  float g() const { return _rgba[1]; }
-  float& g() { return _rgba[1]; }
-  float b() const { return _rgba[2]; }
-  float& b() { return _rgba[2]; }
-  float a() const { return _rgba[3]; }
-  float& a() { return _rgba[3]; }
+  inline float& operator[](unsigned int i) { return _rgba[i]; }
+  inline const float& operator[](unsigned int i) const { return _rgba[i]; }
 
+  inline float r() const { return _rgba[0]; }
+  inline float& r() { return _rgba[0]; }
+  inline float g() const { return _rgba[1]; }
+  inline float& g() { return _rgba[1]; }
+  inline float b() const { return _rgba[2]; }
+  inline float& b() { return _rgba[2]; }
+  inline float a() const { return _rgba[3]; }
+  inline float& a() { return _rgba[3]; }
+
+
+
+
+  void setColor(float r = 0.0f, float g = 0.0f, float b = 0.0f, float a = 1.0f) { _rgba[0] = r; _rgba[1] = g; _rgba[2] = b; _rgba[3] = a; };
+  void setColor(const Color& c) { r() = c.r();  g()= c.g(); b() = c.b(); a() = c.a(); };
+
+  inline float dist(const Color& c) const { return (sqrt((r()-c.r())*(r()-c.r()) + (g()-c.g())*(g()-c.g()) + (b()-c.b())*(b()-c.b()) + (a()-c.a())*(a()-c.a()))); }
+  /// Maths
+  inline const Color& operator+=(const Color& c) { r()+=c.r(); g()+=c.g(); b()+=c.b(); a()+=c.a(); return *this; };
+  inline Color operator+(const Color& c) const { return Color(r()+c.r(), g()+c.g(), b()+c.b(), a()+c.a()); };
+  inline const Color& operator-=(const Color& c) { r()-=c.r(); g()-=c.g(); b()-=c.b(); a()-=c.a(); return *this; };
+  inline Color operator-(const Color& c) const { return Color(r()-c.r(), g()-c.g(), b()-c.b(), a()-c.a()); };
+  inline Color operator*(float v) const { return Color(r()*v, g()*v, b()*v, a()*v); };
+
+  void slerp(const Color& c, float v) { *this += (c - *this) * v; };
+
+  void debug() const;
 
   /// STATIC TRANSFORMATIONS
Index: /trunk/src/util/hud.cc
===================================================================
--- /trunk/src/util/hud.cc	(revision 8447)
+++ /trunk/src/util/hud.cc	(revision 8448)
@@ -21,7 +21,5 @@
 
 #include "world_entities/weapons/weapon_manager.h"
-
-using namespace std;
-
+#include "glgui_widget.h"
 
 /**
@@ -76,6 +74,6 @@
     this->energyWidget->backMaterial().setDiffuseMap("hud_energy_background.png");
     this->energyWidget->backMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-    this->energyWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
-    this->energyWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+/*    this->energyWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
+    this->energyWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/
   }
 
@@ -132,6 +130,6 @@
       weapon->getEnergyWidget()->backMaterial().setDiffuse( .8,.2,.11);
       weapon->getEnergyWidget()->backMaterial().setTransparency(.1);
-      weapon->getEnergyWidget()->frontMaterial().setDiffuse( .2,.5,.7);
-      weapon->getEnergyWidget()->frontMaterial().setTransparency(.6);
+      weapon->getEnergyWidget()->setFrontColor(Color( .2,.5,.7,.6));
+//      weapon->getEnergyWidget()->frontMaterial().setTransparency(.6);
       this->weaponsWidgets.push_back(weapon->getEnergyWidget());
     }
Index: /trunk/src/util/hud.h
===================================================================
--- /trunk/src/util/hud.h	(revision 8447)
+++ /trunk/src/util/hud.h	(revision 8448)
@@ -7,10 +7,9 @@
 #define _HUD_H
 
-#include "glgui_widget.h"
-#include <list>
-
+#include "element_2d.h"
 // FORWARD DECLARATION
 class TiXmlElement;
 class WeaponManager;
+namespace OrxGui { class GLGuiWidget; }
 
 //! A class that renders a HUD.
