Index: /branches/gui/src/lib/graphics/importer/material.cc
===================================================================
--- /branches/gui/src/lib/graphics/importer/material.cc	(revision 8582)
+++ /branches/gui/src/lib/graphics/importer/material.cc	(revision 8583)
@@ -49,4 +49,22 @@
   this->setName(mtlName);
 }
+
+Material& Material::operator=(const Material& material)
+{
+  this->setIllum(material.illumModel);
+  this->setDiffuseColor(material.diffuseColor());
+  this->specular = material.specular;
+  this->ambient = material.ambient;
+  this->setShininess(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)
Index: /branches/gui/src/lib/graphics/importer/material.h
===================================================================
--- /branches/gui/src/lib/graphics/importer/material.h	(revision 8582)
+++ /branches/gui/src/lib/graphics/importer/material.h	(revision 8583)
@@ -48,4 +48,5 @@
   void setBlendFuncS(const std::string& sFactor, const std::string& tFactor);
 
+  Color& diffuseColor() { return diffuse; };
   const Color& diffuseColor() const { return diffuse; };
 
Index: /branches/gui/src/lib/gui/gl/glgui_button.cc
===================================================================
--- /branches/gui/src/lib/gui/gl/glgui_button.cc	(revision 8582)
+++ /branches/gui/src/lib/gui/gl/glgui_button.cc	(revision 8583)
@@ -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: /branches/gui/src/lib/gui/gl/glgui_checkbutton.cc
===================================================================
--- /branches/gui/src/lib/gui/gl/glgui_checkbutton.cc	(revision 8582)
+++ /branches/gui/src/lib/gui/gl/glgui_checkbutton.cc	(revision 8583)
@@ -99,5 +99,5 @@
     if (this->bActive)
     {
-      glColor3fv( &this->frontColor()[0]);
+      glColor3fv( &this->foregroundColor()[0]);
       this->drawRect(this->_checkBox);
 
@@ -124,5 +124,5 @@
     else
     {
-      glColor3fv( &this->frontColor()[0]);
+      glColor3fv( &this->foregroundColor()[0]);
       this->drawRect(this->_checkBox);
     }
Index: /branches/gui/src/lib/gui/gl/glgui_cursor.cc
===================================================================
--- /branches/gui/src/lib/gui/gl/glgui_cursor.cc	(revision 8582)
+++ /branches/gui/src/lib/gui/gl/glgui_cursor.cc	(revision 8583)
@@ -57,7 +57,7 @@
     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->style().background().setDiffuse(1.0,0.0,0.0);
+    this->style().background().setDiffuseMap("cursor.png");
+    this->style().background().setBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     this->setSize2D(50, 50);
     this->setAbsCoor2D(100, 100);
@@ -80,5 +80,5 @@
   bool GLGuiCursor::loadTextureSequence(const std::string& imageNameSubstitue, unsigned int from, unsigned int to)
   {
-    this->backMaterial().setDiffuse(1.0, 1.0, 1.0);
+    this->style().background().setDiffuse(1.0, 1.0, 1.0);
     return this->seq.loadImageSeries(imageNameSubstitue, from, to);
   }
@@ -98,5 +98,5 @@
         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->style().background().setDiffuse(color.x, color.y, color.z);
     }
     //if (this->movement != Vector2D())
@@ -126,5 +126,5 @@
     this->beginDraw();
 
-    this->backMaterial().select();
+    this->background().select();
     if (!this->seq.empty())
       glBindTexture(GL_TEXTURE_2D, this->seq.getFrameTexture((int)frameNumber));
Index: /branches/gui/src/lib/gui/gl/glgui_image.cc
===================================================================
--- /branches/gui/src/lib/gui/gl/glgui_image.cc	(revision 8582)
+++ /branches/gui/src/lib/gui/gl/glgui_image.cc	(revision 8583)
@@ -76,5 +76,5 @@
   void GLGuiImage::updateFrontColor()
   {
-    this->_imageMaterial.setDiffuseColor(this->frontColor());
+    this->_imageMaterial.setDiffuseColor(this->foregroundColor());
   }
 
Index: /branches/gui/src/lib/gui/gl/glgui_inputline.cc
===================================================================
--- /branches/gui/src/lib/gui/gl/glgui_inputline.cc	(revision 8582)
+++ /branches/gui/src/lib/gui/gl/glgui_inputline.cc	(revision 8583)
@@ -54,5 +54,5 @@
     this->_text.setLineWidth(400);
     this->_text.setDotsPosition(LimitedWidthText::Begin);
-    this->_text.setColor(this->frontColor());
+    this->_text.setColor(this->foregroundColor());
     this->_text.setVisibility(false);
     this->resize();
@@ -212,5 +212,5 @@
   void GLGuiInputLine::updateFrontColor()
   {
-    this->_text.setColor(this->frontColor());
+    this->_text.setColor(this->foregroundColor());
   }
 
Index: /branches/gui/src/lib/gui/gl/glgui_slider.cc
===================================================================
--- /branches/gui/src/lib/gui/gl/glgui_slider.cc	(revision 8582)
+++ /branches/gui/src/lib/gui/gl/glgui_slider.cc	(revision 8583)
@@ -239,5 +239,5 @@
     GLGuiWidget::draw();
 
-    glColor4fv(&this->frontColor()[0]);
+    glColor4fv(&this->foregroundColor()[0]);
     this->drawRect(this->_slider);
     this->drawRect(this->_handle);
Index: /branches/gui/src/lib/gui/gl/glgui_style.h
===================================================================
--- /branches/gui/src/lib/gui/gl/glgui_style.h	(revision 8582)
+++ /branches/gui/src/lib/gui/gl/glgui_style.h	(revision 8583)
@@ -26,5 +26,5 @@
 
 
-    /// Retrieve
+    /// Retrieve (ALL THESE FUNCTIONS ARE AGAIN IN THE GLGUI-WIDGET FOR EASY RETRIEVAL)
     /** @returns left borderWidth @param state the State to retrieve from */
     inline float borderLeft(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._borderLeft; }
@@ -40,8 +40,12 @@
     /** @returns the Background Color @param state the State to retrieve from */
     inline const Color& backgroundColor(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._background.diffuseColor(); }
+    /** @returns the Background Material. @param state the state to retrieve from */
+    inline const Material& background(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._background; }
     /** @returns background Texture. @param state the State to retrieve from */
-    inline const Texture& backgrorundTexture(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._background.diffuseTexture(); }
+    inline const Texture& backgroundTexture(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._background.diffuseTexture(); }
     /** @returns the foreground Color @param state the State to retrieve from */
     inline const Color& foregroundColor(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._foreground.diffuseColor(); }
+    /** @returns the ForeGroung Material. @param state the state to retrieve from */
+    inline const Material& foreground(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._foreground; }
 
     /** @returns FeaturePosition */
@@ -91,4 +95,9 @@
     void setForegroundColor(const Color& color, OrxGui::State state);
     void setForegroundColorS(float r, float g, float b, float a, const std::string& stateName);
+
+    inline Color& foregroundColor(OrxGui::State state= GLGUI_DEFAULT_STYLE) { return _style[state]._foreground.diffuseColor(); }
+    inline Color& backgroundColor(OrxGui::State state= GLGUI_DEFAULT_STYLE) { return _style[state]._background.diffuseColor(); }
+    inline Material& background(OrxGui::State state = GLGUI_DEFAULT_STYLE) { return _style[state]._background; }
+    inline Material& foreground(OrxGui::State state = GLGUI_DEFAULT_STYLE) { return _style[state]._foreground; }
 
     void loadBackgroundMaterial(const Material& material);
Index: /branches/gui/src/lib/gui/gl/glgui_widget.cc
===================================================================
--- /branches/gui/src/lib/gui/gl/glgui_widget.cc	(revision 8582)
+++ /branches/gui/src/lib/gui/gl/glgui_widget.cc	(revision 8583)
@@ -66,17 +66,12 @@
     this->_clickable = false;
     this->_pushed = false;
+    this->_state = OrxGui::Normal;
 
     this->setVisibility(GLGUI_WIDGET_DEFAULT_VISIBLE);
 
-    this->_backMat.setDiffuseColor(Color(1.0, 0.5, 0.4, 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->_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;
   }
 
@@ -125,5 +120,5 @@
     if (instantaniously)
     {
-      this->_frontColor = frontColor;
+      this->style().setForegroundColor(frontColor);
       if (this->_toFrontColor != NULL)
       {
@@ -141,36 +136,4 @@
 
 
-  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();
-  }
-
-
-
   void GLGuiWidget::resize()
   {
@@ -271,7 +234,7 @@
     if (this->_toFrontColor)
     {
-      this->_frontColor.slerp(*_toFrontColor, dt*3.0);
+      this->_style.foregroundColor(_state).slerp(*_toFrontColor, dt*3.0);
       this->updateFrontColor();
-      if (this->_frontColor.dist(*_toFrontColor) < .1)
+      if (this->style().foregroundColor(_state).dist(*_toFrontColor) < .1)
       {
         delete _toFrontColor;
@@ -287,7 +250,7 @@
   void GLGuiWidget::draw() const
   {
-    this->backMaterial().select();
+    this->background().select();
     this->drawRect(this->backRect());
-    this->backMaterial().unselect();
+    this->background().unselect();
   }
 
Index: /branches/gui/src/lib/gui/gl/glgui_widget.h
===================================================================
--- /branches/gui/src/lib/gui/gl/glgui_widget.h	(revision 8582)
+++ /branches/gui/src/lib/gui/gl/glgui_widget.h	(revision 8583)
@@ -66,35 +66,52 @@
     void disconnect(GLGuiWidget* sender, Signal& signal, BaseObject* receiver);
 
+    OrxGui::State state() const { return this->_state; };
 
     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; };
+
+    /// STYLE-CONNECTION
+    /** @returns left borderWidth */
+    inline float borderLeft() const { return _style.borderLeft(_state); }
+    /** @returns right borderWidth */
+    inline float borderRight() const { return _style.borderRight(_state); }
+    /** @returns top borderWidth */
+    inline float borderTop() const { return _style.borderTop(_state); }
+    /** @returns bottom borderWidth */
+    inline float borderBottom() const { return _style.borderBottom(_state); }
+
+    /** @returns textSize */
+    inline float textSize() const { return _style.textSize(_state); }
+    /** @returns the Background Color */
+    inline const Color& backgroundColor() const { return _style.backgroundColor(_state); }
+    /** @returns background Texture. */
+    inline const Texture& backgroundTexture() const { return _style.backgroundTexture(_state); };
+    /** @returns the Background Material. */
+    inline const Material& background() const { return _style.background(_state); }
+    /** @returns the foreground Color */
+    inline const Color& foregroundColor() const { return _style.foregroundColor(_state); }
+    /** @returns the ForeGroung Material. */
+    inline const Material& foreground() const { return _style.foreground(_state); }
+
+    /** @returns FeaturePosition */
+    inline FeaturePosition featurePosition() const { return _style.featurePosition(); }
+    /** @returns the font */
+    inline const Font* const font() const { return _style.font(); }
+    /** @returns true if the Element is Animated */
+    inline bool animated() const { return _style.animated(); }
+    /** @returns true if State-Changes are animated */
+    inline bool animatedStateChanges() const { return _style.animatedStateChanges(); }
+
+
+
     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); };
 
     inline void drawRect(const Rect2D& rect) const
@@ -144,20 +161,15 @@
 
     /// LOOKS
-    Material                       _backMat;
+    GLGuiStyle                     _style;
     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.
Index: /branches/gui/src/lib/gui/gl/specials/glgui_notifier.cc
===================================================================
--- /branches/gui/src/lib/gui/gl/specials/glgui_notifier.cc	(revision 8582)
+++ /branches/gui/src/lib/gui/gl/specials/glgui_notifier.cc	(revision 8583)
@@ -200,5 +200,5 @@
     this->beginDraw();
 
-    this->backMaterial().select();
+    this->background().select();
     this->drawRect(this->backRect());
     this->endDraw();
Index: /branches/gui/src/story_entities/simple_game_menu.cc
===================================================================
--- /branches/gui/src/story_entities/simple_game_menu.cc	(revision 8582)
+++ /branches/gui/src/story_entities/simple_game_menu.cc	(revision 8583)
@@ -120,5 +120,4 @@
     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());
Index: /branches/gui/src/util/hud.cc
===================================================================
--- /branches/gui/src/util/hud.cc	(revision 8582)
+++ /branches/gui/src/util/hud.cc	(revision 8583)
@@ -89,6 +89,6 @@
   {
     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->style().background().setDiffuseMap("hud_energy_background.png");
+    this->energyWidget->style().background().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);*/
@@ -143,6 +143,6 @@
       {
         weapon->getEnergyWidget()->show();
-        weapon->getEnergyWidget()->backMaterial().setDiffuse( .8,.2,.11);
-        weapon->getEnergyWidget()->backMaterial().setTransparency(.1);
+        weapon->getEnergyWidget()->style().background().setDiffuse( .8,.2,.11);
+        weapon->getEnergyWidget()->style().background().setTransparency(.1);
         weapon->getEnergyWidget()->setFrontColor(Color( .2,.5,.7,.6));
         //      weapon->getEnergyWidget()->frontMaterial().setTransparency(.6);
