Index: code/branches/hud3/src/orxonox/hud/BarOverlayElement.cc
===================================================================
--- code/branches/hud3/src/orxonox/hud/BarOverlayElement.cc	(revision 1328)
+++ code/branches/hud3/src/orxonox/hud/BarOverlayElement.cc	(revision 1329)
@@ -49,5 +49,5 @@
         color_ = 2;
         autoColor_ = true;
-        dir_ = BarOverlayElement::RIGHT;
+        left2Right = false; // default: right to left progress
 
         // get window data...
@@ -66,21 +66,33 @@
 
         // create background...
-        bar_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel", name_+"Bar"));
-        bar_->show();
-        container_->addChild(bar_);
-        bar_->setPosition(left_, top_);
-        bar_->setDimensions(width_, height_);
-        bar_->setMetricsMode(Ogre::GMM_PIXELS);
-        bar_->setMaterialName("Orxonox/Green");
+        background_ = static_cast<OverlayContainer*>(om->createOverlayElement("Panel", name_+"container"));
+        background_->show();
+        container_->addChild(background_);
+        background_->setMetricsMode(Ogre::GMM_PIXELS);
+        background_->setMaterialName("Orxonox/BarBackground");
 
-        setPosition(left_,top_);
-        setDimensions(width_,height_);
+        show();
+        background_->addChild(this);
         setMetricsMode(Ogre::GMM_PIXELS);
-        setMaterialName("Orxonox/BarBackground");
+        setMaterialName("Orxonox/Green");
+        resize();
+    }
+
+    void BarOverlayElement::resize(){
+        windowW_ = GraphicsEngine::getSingleton().getWindowWidth();
+        windowH_ = GraphicsEngine::getSingleton().getWindowHeight();
+        // cálculate new absolute coordinates...
+        left_ = leftRel_ * windowW_;
+        top_ = topRel_ * windowH_;
+        width_ = widthRel_ * windowW_;
+        height_ = heightRel_ * windowH_;
+        // adapt background
+        background_->setPosition(left_, top_);
+        background_->setDimensions(width_, height_);
+        // adapt bar
         setValue(value_);
     }
 
-
-   void BarOverlayElement::setValue(float value){
+    void BarOverlayElement::setValue(float value){
         value_ = value;
         // set color, if nescessary
@@ -91,25 +103,12 @@
         }
         // set value
-        switch(dir_){
-        case BarOverlayElement::DOWN:
-            bar_->setPosition(left_,top_);
-            bar_->setDimensions(width_,height_*value_);
-            break;
-        case BarOverlayElement::LEFT:
-            bar_->setPosition(left_+width_-width_*value_,top_);
-            bar_->setDimensions(width_*value_,height_);
-            break;
-        case BarOverlayElement::UP:
-            bar_->setPosition(left_,top_+height_-height_*value_);
-            bar_->setDimensions(width_,height_*value_);
-            break;
-        default:
-            bar_->setPosition(left_,top_);
-            bar_->setDimensions(width_*value_,height_);
-            break;
+        if(left2Right){ // backward case
+            setPosition(0+width_-width_*value_, 0);
+            setDimensions(width_*value_,height_);
+        }else{          // default case
+            setPosition(0, 0);
+            setDimensions(width_*value_,height_);
         }
-    }
-
-    void BarOverlayElement::setDir(int dir){
+        if(value_ != 0) setTiling(value_, 1.0);
     }
 
@@ -118,11 +117,11 @@
         switch(color){
         case 0:
-            bar_->setMaterialName("Orxonox/Red");
+            setMaterialName("Orxonox/Red");
             break;
         case 1:
-            bar_->setMaterialName("Orxonox/Yellow");
+            setMaterialName("Orxonox/Yellow");
             break;
         case 2:
-            bar_->setMaterialName("Orxonox/Green");
+            setMaterialName("Orxonox/Green");
         }
     }
Index: code/branches/hud3/src/orxonox/hud/BarOverlayElement.h
===================================================================
--- code/branches/hud3/src/orxonox/hud/BarOverlayElement.h	(revision 1328)
+++ code/branches/hud3/src/orxonox/hud/BarOverlayElement.h	(revision 1329)
@@ -44,31 +44,24 @@
   {
     private:
-
-    bool autoColor_;                    // whether bar changes color automatically
-    float value_;                       // progress of bar
-    int dir_;                           // direction of progress
-    int color_;
-    int left_;
-    int top_;
-    int width_;
-    int height_;
-    int windowW_, windowH_;
-    Ogre::Real leftRel_;
-    Ogre::Real topRel_;
-    Ogre::Real widthRel_;
-    Ogre::Real heightRel_;
-    Ogre::PanelOverlayElement* bar_;    // the actual bar
-    Ogre::OverlayManager* om;           // our overlay manager
-    Ogre::OverlayContainer* container_; // our parent container to attach to
-    Ogre::String name_;
+        bool autoColor_;                    // whether bar changes color automatically
+        float value_;                       // progress of bar
+        int color_;
+        int left_;
+        int top_;
+        int width_;
+        int height_;
+        int windowW_, windowH_;
+        Ogre::Real leftRel_;
+        Ogre::Real topRel_;
+        Ogre::Real widthRel_;
+        Ogre::Real heightRel_;
+        Ogre::OverlayManager* om;           // our overlay manager
+        Ogre::OverlayContainer* container_; // our parent container to attach to
+        Ogre::OverlayContainer* background_;
+        Ogre::String name_;
 
     public:
-        // directions
-        static const int RIGHT = 0;
-        static const int UP = 1;
-        static const int LEFT = 2;
-        static const int DOWN = 3;
-        // predefined colors
-        static const int RED = 0;
+        bool left2Right;
+        static const int RED = 0;           // predefined colors
         static const int YELLOW = 1;
         static const int GREEN = 2;
@@ -76,10 +69,8 @@
         BarOverlayElement(const Ogre::String& name);
         virtual ~BarOverlayElement();
-
         void init(Real leftRel, Real topRel, Real widthRel, Real heightRel, Ogre::OverlayContainer* container);
-        void setDir(int dir);
+        void resize();
         void setValue(float value);
         void setColor(int color);
-
         float getValue();
         int getBarColor();
Index: code/branches/hud3/src/orxonox/hud/HUD.cc
===================================================================
--- code/branches/hud3/src/orxonox/hud/HUD.cc	(revision 1328)
+++ code/branches/hud3/src/orxonox/hud/HUD.cc	(revision 1329)
@@ -66,7 +66,4 @@
     radar->show();
 
-    container->addChild(energyCounter);
-    container->addChild(speedo);
-    container->addChild(radar);
     container->show();
     orxonoxHUD->add2D(container);
@@ -78,8 +75,8 @@
     container->setMetricsMode(Ogre::GMM_RELATIVE);
 
-    energyCounter->init(0.01, 0.01, 0.2, 0.02, container);
+    energyCounter->init(0.01, 0.95, 0.4, 0.04, container);
     energyCounter->setValue(1);
 
-    speedo->init(0.01, 0.04, 0.2, 0.02, container);
+    speedo->init(0.01, 0.90, 0.4, 0.04, container);
 
     radar->init(0.5, 0.9, 0.2, container);
@@ -88,7 +85,12 @@
   void HUD::tick(float dt)
   {
+      energyCounter->resize();
+
       float v = SpaceShip::instance_s->getVelocity().length();
       float vmax = SpaceShip::instance_s->getMaxSpeed();
       speedo->setValue(v/vmax);
+      speedo->resize();
+
+      radar->resize();
       radar->update();
   }
Index: code/branches/hud3/src/orxonox/hud/RadarOverlayElement.cc
===================================================================
--- code/branches/hud3/src/orxonox/hud/RadarOverlayElement.cc	(revision 1328)
+++ code/branches/hud3/src/orxonox/hud/RadarOverlayElement.cc	(revision 1329)
@@ -78,4 +78,5 @@
         point = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel", "point"));
         point->show();
+        container->addChild(this);
         container->addChild(point);
         point->setMaterialName("Orxonox/RedDot");
@@ -97,5 +98,4 @@
 
     void RadarOverlayElement::update() {
-        resize();
         shipPos_ = SpaceShip::instance_s->getPosition();
         currentDir_ = SpaceShip::instance_s->getOrientation()*initialDir_; 		// according to beni....
Index: code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h
===================================================================
--- code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h	(revision 1328)
+++ code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h	(revision 1329)
@@ -41,41 +41,36 @@
 namespace orxonox
 {
+    class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement
+    {
+        private:
+            Ogre::PanelOverlayElement* point;
+            Ogre::OverlayContainer* container_;
+            Ogre::OverlayManager* om;               // pointer to the one and only overlay manager
+            Vector3 initialDir_;	                // direction of nose
+            Vector3 currentDir_;
+            Vector3 initialOrth_;                   // direction of normal
+            Vector3 currentOrth_;
+            Vector3 targetPos_;                     // position of target
+            Vector3 shipPos_;                       // position of ship
 
-  class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement
-  {
-  private:
+            Ogre::Real radius_;                     // radius on the radar
+            Ogre::Real phi_;                        // angle on the radar
+            bool right_;                            // checks whether the object is on the right side (since cos is not bijective)
+            Ogre::Real leftRel_, topRel_, dimRel_;  // relative position/dimension
+            int left_, top_, dim_;                  // absolute position/dimension
+            int windowW_, windowH_;                   // absolute window dimensions
+            int count_;
 
-    Ogre::PanelOverlayElement* point;
-    Ogre::OverlayContainer* container_;
-    Ogre::OverlayManager* om;               // pointer to the one and only overlay manager
-    Vector3 initialDir_;	                // direction of nose
-    Vector3 currentDir_;
-    Vector3 initialOrth_;                   // direction of normal
-    Vector3 currentOrth_;
-    Vector3 targetPos_;                     // position of target
-    Vector3 shipPos_;                       // position of ship
-
-    Ogre::Real radius_;                     // radius on the radar
-    Ogre::Real phi_;                        // angle on the radar
-    bool right_;                            // checks whether the object is on the right side (since cos is not bijective)
-    Ogre::Real leftRel_, topRel_, dimRel_;  // relative position/dimension
-    int left_, top_, dim_;                  // absolute position/dimension
-    int windowW_, windowH_;                   // absolute window dimensions
-    int count_;
-
-    void resize();
-
-  public:
-
-    RadarOverlayElement(const Ogre::String& name);
-    virtual ~RadarOverlayElement();
-    virtual void initialise();
-    void update();
-    void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);
-    void setMainShipPosition(int dirX, int dirY, int dirZ, int ortX, int ortY, int ortZ);
-    int newShip(int X, int Y, int Z);
-
-    void resetShip(int shipID, int Y, int Z);
-  };
+        public:
+            RadarOverlayElement(const Ogre::String& name);
+            virtual ~RadarOverlayElement();
+            virtual void initialise();
+            void update();
+            void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);
+            void setMainShipPosition(int dirX, int dirY, int dirZ, int ortX, int ortY, int ortZ);
+            int newShip(int X, int Y, int Z);
+            void resize();
+            void resetShip(int shipID, int Y, int Z);
+    };
 }
 
