Index: code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 1626)
+++ code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 1627)
@@ -96,13 +96,4 @@
         if (mode == XMLPort::LoadObject)
         {
-            // set some default values
-            this->windowAspectRatio_ = 1.0f;
-            this->bCorrectAspect_    = false;
-            this->size_              = Vector2(1.0f, 1.0f);
-            this->sizeCorrection_    = Vector2(1.0f, 1.0f);
-            this->position_          = Vector2(0.0f, 0.0f);
-            this->pickPoint_         = Vector2(0.0f, 0.0f);
-            this->angle_             = Radian(0.0f);
-
             // add this overlay to the static map of OrxonoxOverlays
             if (overlays_s.find(this->getName()) != overlays_s.end())
@@ -122,28 +113,31 @@
             this->overlay_->add2D(this->background_);
 
-            // We'll have to get the aspect ratio for the first. Afterwards windowResized() gets
+            // We'll have to get the aspect ratio manually for the first time. Afterwards windowResized() gets
             // called automatically by the GraphicsEngine.
             this->windowResized(GraphicsEngine::getSingleton().getWindowWidth(),
                 GraphicsEngine::getSingleton().getWindowHeight());
+
+            this->changedVisibility();
+
+            this->setSize(Vector2(0.5f, 0.5f));
+            this->setPickPoint(Vector2(0.5f, 0.5f));
+            this->setPosition(Vector2(0.5f, 0.5f));
+            this->setRotation(Degree(0.0f));
+            this->setAspectCorrection(true);
+            this->setBackgroundMaterial("");
         }
 
-        XMLPortParam(OrxonoxOverlay, "correctAspect", setAspectCorrection, getAspectCorrection, xmlElement, mode);
-        XMLPortParam(OrxonoxOverlay, "size", setSize, getSize, xmlElement, mode);
-        XMLPortParam(OrxonoxOverlay, "rotation", setRotation, getRotation, xmlElement, mode);
-        // see setPickPoint()
-        XMLPortParam(OrxonoxOverlay, "pickPoint", setPickPoint, getPickPoint, xmlElement, mode);
-        XMLPortParam(OrxonoxOverlay, "position", setPosition, getPosition, xmlElement, mode);
-        XMLPortParam(OrxonoxOverlay, "background", setBackgroundMaterial, getBackgroundMaterial, xmlElement, mode);
-
-        if (mode == XMLPort::LoadObject)
-        {
-            // call all the virtual 'setters'
-            this->changedVisibility();
-            this->angleChanged();
-            this->sizeCorrectionChanged();
-            this->sizeChanged();
-            // probably gets called 4 times (by all the methods), but sizeChanged() could be overwritten.
-            this->positionChanged();
-        }
+        XMLPortParam(OrxonoxOverlay, "size",      setSize,      getSize,      xmlElement, mode)
+            .defaultValues(Vector2(0.5f, 0.5f));
+        XMLPortParam(OrxonoxOverlay, "pickPoint", setPickPoint, getPickPoint, xmlElement, mode)
+            .defaultValues(Vector2(0.0f, 0.0f));
+        XMLPortParam(OrxonoxOverlay, "position",  setPosition,  getPosition,  xmlElement, mode)
+            .defaultValues(Vector2(0.0f, 0.0f));
+        XMLPortParam(OrxonoxOverlay, "rotation",  setRotation,  getRotation,  xmlElement, mode)
+            .defaultValues(0.0f);
+        XMLPortParam(OrxonoxOverlay, "correctAspect", setAspectCorrection,   getAspectCorrection,   xmlElement, mode)
+            .defaultValues(true);
+        XMLPortParam(OrxonoxOverlay, "background",    setBackgroundMaterial, getBackgroundMaterial, xmlElement, mode)
+            .defaultValues("");
     }
 
Index: code/trunk/src/orxonox/overlays/OverlayGroup.cc
===================================================================
--- code/trunk/src/orxonox/overlays/OverlayGroup.cc	(revision 1626)
+++ code/trunk/src/orxonox/overlays/OverlayGroup.cc	(revision 1627)
@@ -66,11 +66,10 @@
         if (mode == XMLPort::LoadObject)
         {
-            // set default values
-            this->scale_  = Vector2(1.0, 1.0);
-            this->scroll_ = Vector2(0.0, 0.0);
+            this->setScale(Vector2(1.0f, 1.0f));
+            this->setScroll(Vector2(0.0f, 0.0f));
         }
 
-        XMLPortParam(OverlayGroup, "scale", setScale, getScale, xmlElement, mode);
-        XMLPortParam(OverlayGroup, "scroll", setScroll, getScroll, xmlElement, mode);
+        XMLPortParam(OverlayGroup, "scale",  setScale,  getScale,  xmlElement, mode).defaultValues(Vector2(1.0, 1.0));
+        XMLPortParam(OverlayGroup, "scroll", setScroll, getScroll, xmlElement, mode).defaultValues(Vector2(0.0, 0.0));
         // loads all the child elements
         XMLPortObject(OverlayGroup, OrxonoxOverlay, "", addElement, getElement, xmlElement, mode, false, true);
Index: code/trunk/src/orxonox/overlays/OverlayText.cc
===================================================================
--- code/trunk/src/orxonox/overlays/OverlayText.cc	(revision 1626)
+++ code/trunk/src/orxonox/overlays/OverlayText.cc	(revision 1627)
@@ -57,11 +57,4 @@
     void OverlayText::XMLPort(Element& xmlElement, XMLPort::Mode mode)
     {
-        if (mode == XMLPort::LoadObject)
-        {
-            // setting this to true makes the text more readable when the
-            // resolution aspect is far from 1.0
-            this->bCorrectAspect_ = true; // can be overridden by xml
-        }
-
         OrxonoxOverlay::XMLPort(xmlElement, mode);
 
@@ -70,18 +63,15 @@
             this->text_ = static_cast<Ogre::TextAreaOverlayElement*>(Ogre::OverlayManager::getSingleton()
                 .createOverlayElement("TextArea", "OverlayText_text_" + getUniqueNumberStr()));
-            this->text_->setCharHeight(1.0f);
-            this->text_->setFontName("Monofur");
 
             this->background_->addChild(this->text_);
+
+            this->setFont("Monofur");
+            this->caption_ = "";
+            this->setTextSize(1.0f);
         }
 
-        XMLPortParam(OverlayText, "font", setFont, getFont, xmlElement, mode);
-        XMLPortParam(OverlayText, "caption", setCaption, getCaption, xmlElement, mode);
-        XMLPortParam(OverlayText, "textSize", setTextSize, getTextSize, xmlElement, mode);
-
-        if (mode == XMLPort::LoadObject)
-        {
-            this->text_->setCaption(this->caption_);
-        }
+        XMLPortParam(OverlayText, "font",     setFont,     getFont,     xmlElement, mode).defaultValues("Monofur");
+        XMLPortParam(OverlayText, "caption",  setCaption,  getCaption,  xmlElement, mode).defaultValues("");
+        XMLPortParam(OverlayText, "textSize", setTextSize, getTextSize, xmlElement, mode).defaultValues(1.0f);
     }
 
@@ -102,4 +92,7 @@
     void OverlayText::sizeChanged()
     {
+        if (!this->overlay_)
+            return;
+
         this->overlay_->setScale(size_.y * sizeCorrection_.y, size_.y * sizeCorrection_.y);
         positionChanged();
Index: code/trunk/src/orxonox/overlays/hud/HUDBar.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDBar.cc	(revision 1626)
+++ code/trunk/src/orxonox/overlays/hud/HUDBar.cc	(revision 1627)
@@ -55,6 +55,13 @@
         BaseObject::XMLPort(xmlElement, mode);
 
-        XMLPortParam(BarColour, "colour", setColour, getColour, xmlElement, mode);
-        XMLPortParam(BarColour, "position", setPosition, getPosition, xmlElement, mode);
+        if (mode == XMLPort::LoadObject)
+        {
+            this->setColour(ColourValue(1.0, 1.0, 1.0, 1.0));
+            this->setPosition(0.0f);
+        }
+
+        XMLPortParam(BarColour, "colour", setColour, getColour, xmlElement, mode)
+            .defaultValues(ColourValue(1.0, 1.0, 1.0, 1.0));
+        XMLPortParam(BarColour, "position", setPosition, getPosition, xmlElement, mode).defaultValues(0.0f);
     }
 
@@ -90,10 +97,4 @@
             this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, ColourValue(0.2, 0.7, 0.2));
 
-            // create bar
-            barWidth_s = 0.88f;
-            barHeight_s = 1.0f;
-            barOffsetLeft_s = 0.06f;
-            barOffsetTop_s = 0.0f;
-
             this->bar_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
                 .createOverlayElement("Panel", "HUDBar_bar_" + getUniqueNumberStr()));
@@ -101,17 +102,17 @@
             this->background_->addChild(bar_);
 
-            this->setValue(0);
-            this->autoColour_ = true;
-            this->right2Left_ = false; // default is left to right progress
+            this->setValue(0.0f);
+            this->setRightToLeft(false);
+            this->setAutoColour(true);
         }
 
-        XMLPortParamLoadOnly(HUDBar, "value", setValue, xmlElement, mode);
-        XMLPortParam(HUDBar, "right2left", setRightToLeft, getRightToLeft, xmlElement, mode);
+        XMLPortParam(HUDBar, "initialValue", setValue,       getValue,       xmlElement, mode).defaultValues(0.0f);
+        XMLPortParam(HUDBar, "rightToLeft",   setRightToLeft, getRightToLeft, xmlElement, mode).defaultValues(false);
+        XMLPortParam(HUDBar, "autoColour",   setAutoColour,  getAutoColour,  xmlElement, mode).defaultValues(true);
         XMLPortObject(HUDBar, BarColour, "", addColour, getColour, xmlElement, mode, false, true);
     }
 
-    void HUDBar::setValue(float value)
+    void HUDBar::valueChanged()
     {
-        this->value_ = clamp<float>(value, 0, 1);
         if (this->autoColour_ && this->textureUnitState_)
         {
@@ -153,12 +154,12 @@
         {
             // backward casew
-            this->bar_->setPosition(barOffsetLeft_s + barWidth_s * (1 - this->value_), barOffsetTop_s);
-            this->bar_->setDimensions(barWidth_s * this->value_, barHeight_s);
+            this->bar_->setPosition(0.06f + 0.88f * (1 - this->value_), 0.0f);
+            this->bar_->setDimensions(0.88f * this->value_, 1.0f);
         }
         else
         {
             // default case
-            this->bar_->setPosition(barOffsetLeft_s, barOffsetTop_s);
-            this->bar_->setDimensions(barWidth_s * this->value_, barHeight_s);
+            this->bar_->setPosition(0.06f, 0.0f);
+            this->bar_->setDimensions(0.88f * this->value_, 1.0f);
         }
         if (this->value_ != 0)
Index: code/trunk/src/orxonox/overlays/hud/HUDBar.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDBar.h	(revision 1626)
+++ code/trunk/src/orxonox/overlays/hud/HUDBar.h	(revision 1627)
@@ -60,4 +60,5 @@
     };
 
+
     class _OrxonoxExport HUDBar : public OrxonoxOverlay
     {
@@ -68,13 +69,17 @@
         virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
 
-        virtual void setValue(float value);
         void clearColours();
 
-        inline void setRightToLeft(bool r2l)
-        { this->right2Left_ = r2l; this->setValue(this->value_); }
-        inline bool getRightToLeft() const
-        { return this->right2Left_; }
-        inline float getValue() const
-        { return this->value_; }
+        void setRightToLeft(bool r2l) { this->right2Left_ = r2l; this->valueChanged(); }
+        bool getRightToLeft() const   { return this->right2Left_; }
+
+        void setValue(float value)    { this->value_ = clamp(value, 0.0f, 1.0f); this->valueChanged(); }
+        float getValue() const        { return this->value_; }
+
+        void setAutoColour(bool val)  { this->autoColour_ = val; this->valueChanged(); }
+        bool getAutoColour() const    { return this->autoColour_; }
+
+    protected:
+        virtual void valueChanged();
 
     private:
@@ -91,9 +96,4 @@
         std::vector<BarColour*> barColours_;
 
-        float barWidth_s;
-        float barHeight_s;
-        float barOffsetLeft_s;
-        float barOffsetTop_s;
-
         static unsigned int materialcount_s;
     };
Index: code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc	(revision 1626)
+++ code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc	(revision 1627)
@@ -76,6 +76,4 @@
             navText_ = static_cast<Ogre::TextAreaOverlayElement*>(Ogre::OverlayManager::getSingleton()
                 .createOverlayElement("TextArea", "HUDNavigation_navText_" + getUniqueNumberStr()));
-            navText_->setCharHeight(0.05f);
-            navText_->setFontName("Monofur");
 
             // create nav marker
@@ -83,5 +81,4 @@
                 .createOverlayElement("Panel", "HUDNavigation_navMarker_" + getUniqueNumberStr()));
             navMarker_->setMaterialName("Orxonox/NavArrows");
-            navMarkerSize_ = 0.05; //default
             wasOutOfView_ = true; // just to ensure the material is changed right the first time..
 
@@ -90,5 +87,4 @@
                 .createOverlayElement("Panel", "HUDNavigation_aimMarker_" + getUniqueNumberStr()));
             aimMarker_->setMaterialName("Orxonox/NavCrosshair");
-            aimMarkerSize_ = 0.04; // default
             
             background_->addChild(navMarker_);
@@ -98,15 +94,17 @@
             // hide at first
             this->setVisible(false);
-        }
-
-        XMLPortParam(HUDNavigation, "font", setFont, getFont, xmlElement, mode);
-        XMLPortParam(HUDNavigation, "textSize", setTextSize, getTextSize, xmlElement, mode);
-        XMLPortParam(HUDNavigation, "navMarkerSize", setNavMarkerSize, getNavMarkerSize, xmlElement, mode);
-        XMLPortParam(HUDNavigation, "aimMarkerSize", setAimMarkerSize, getAimMarkerSize, xmlElement, mode);
-
-        if (mode == XMLPort::LoadObject)
-        {
-            this->sizeChanged();
-        }
+
+            this->setFont("Monofur");
+            this->setTextSize(0.05f);
+            this->setNavMarkerSize(0.05f);
+            this->setAimMarkerSize(0.04f);
+        }
+
+        XMLPortParam(HUDNavigation, "font",     setFont,     getFont,     xmlElement, mode).defaultValues("Monofur");
+        XMLPortParam(HUDNavigation, "textSize", setTextSize, getTextSize, xmlElement, mode).defaultValues(0.05f);
+        XMLPortParam(HUDNavigation, "navMarkerSize", setNavMarkerSize, getNavMarkerSize, xmlElement, mode)
+            .defaultValues(0.05f);
+        XMLPortParam(HUDNavigation, "aimMarkerSize", setAimMarkerSize, getAimMarkerSize, xmlElement, mode)
+            .defaultValues(0.04f);
     }
 
Index: code/trunk/src/orxonox/overlays/hud/HUDNavigation.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDNavigation.h	(revision 1626)
+++ code/trunk/src/orxonox/overlays/hud/HUDNavigation.h	(revision 1627)
@@ -54,8 +54,8 @@
 
         // XMLPort accessors
-        void setNavMarkerSize(float size) { this->navMarkerSize_ = size; }
+        void setNavMarkerSize(float size) { this->navMarkerSize_ = size; this->sizeChanged(); }
         float getNavMarkerSize() const    { return this->navMarkerSize_; }
 
-        void setAimMarkerSize(float size) { this->aimMarkerSize_ = size; }
+        void setAimMarkerSize(float size) { this->aimMarkerSize_ = size; this->sizeChanged(); }
         float getAimMarkerSize() const    { return this->aimMarkerSize_; }
 
Index: code/trunk/src/orxonox/overlays/hud/HUDRadar.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDRadar.cc	(revision 1626)
+++ code/trunk/src/orxonox/overlays/hud/HUDRadar.cc	(revision 1627)
@@ -66,7 +66,4 @@
     void HUDRadar::XMLPort(Element& xmlElement, XMLPort::Mode mode)
     {
-        if (mode == XMLPort::LoadObject)
-            this->bCorrectAspect_ = true;
-
         OrxonoxOverlay::XMLPort(xmlElement, mode);
 
@@ -79,12 +76,15 @@
             marker_->hide();
 
-            this->sensitivity_ = 1.0f;
-            this->halfDotSizeDistance_ = 3000.0f;
-            this->maximumDotSize_ = 0.1;
+            this->setRadarSensitivity(1.0f);
+            this->setHalfDotSizeDistance(3000.0f);
+            this->setMaximumDotSize(0.1f);
         }
 
-        XMLPortParam(HUDRadar, "sensitivity", setRadarSensitivity, getRadarSensitivity, xmlElement, mode);
-        XMLPortParam(HUDRadar, "halfDotSizeDistance", setHalfDotSizeDistance, getHalfDotSizeDistance, xmlElement, mode);
-        XMLPortParam(HUDRadar, "maximumDotSize", setMaximumDotSize, getMaximumDotSize, xmlElement, mode);
+        XMLPortParam(HUDRadar, "sensitivity", setRadarSensitivity, getRadarSensitivity, xmlElement, mode)
+            .defaultValues(1.0f);
+        XMLPortParam(HUDRadar, "halfDotSizeDistance", setHalfDotSizeDistance, getHalfDotSizeDistance,
+            xmlElement, mode).defaultValues(3000.0f);
+        XMLPortParam(HUDRadar, "maximumDotSize", setMaximumDotSize, getMaximumDotSize, xmlElement, mode)
+            .defaultValues(0.1f);
 
         shapeMaterials_[RadarViewable::Dot]      = "RadarSquare.tga";
