Index: orxonox/branches/physics/src/glmenu/glmenu_imagescreen.cc
===================================================================
--- orxonox/branches/physics/src/glmenu/glmenu_imagescreen.cc	(revision 4178)
+++ orxonox/branches/physics/src/glmenu/glmenu_imagescreen.cc	(revision 4283)
@@ -19,7 +19,7 @@
 #include "glmenu_imagescreen.h"
 
-#include "stdincl.h"
 #include "graphics_engine.h"
 #include "material.h"
+#include "factory.h"
 
 CREATE_FACTORY(GLMenuImageScreen);
@@ -38,9 +38,8 @@
    \param root The Element to load the GLMenu from
 */
-GLMenuImageScreen::GLMenuImageScreen (TiXmlElement* root)
+GLMenuImageScreen::GLMenuImageScreen(const TiXmlElement* root)
 {
   this->init();
-  this->load(root);
-
+  this->loadParams(root);
 }
 
@@ -56,36 +55,20 @@
    \li ElementCount: INT: how many elements will be loaded
 */
-void GLMenuImageScreen::load(TiXmlElement* root)
-{
-  const char* string;
-
-  // Model Loading	
-  string = grabParameter( root, "BackgroundImage");
-  if( string != NULL)
-    this->setBackgroundImage(string);
-
-  string = grabParameter(root, "BackgroundPS");
-  if (string != NULL)
-    {
-      float f1, f2, f3, f4;
-      sscanf (string, "%f %f %f %f", &f1, &f2, &f3, &f4);
-      this->setPosition(f1,f2);
-      this->setScale(f3,f4);
-    }
-
-  string = grabParameter( root, "BarImage");
-  if (string != NULL)
-    this->setBarImage(string);
-  string = grabParameter(root, "BarPS");
-  if (string != NULL)
-    {
-      float f1, f2, f3, f4;
-      sscanf (string, "%f %f %f %f", &f1, &f2, &f3, &f4);
-      this->setBarPosScale(f1,f2,f3,f4);
-    }
-
-  string = grabParameter( root, "ElementCount");
-  if (string != NULL)
-    this->setMaximum(atoi(string));
+void GLMenuImageScreen::loadParams(const TiXmlElement* root)
+{
+  LoadParam<GLMenuImageScreen>(root, "BackgroundImage", this, &GLMenuImageScreen::setBackgroundImage)
+    .describe("sets the image to load onto the loadscreen");
+
+  LoadParam<GLMenuImageScreen>(root, "BackgroundPS", this, &GLMenuImageScreen::setPosScale)
+    .describe("The Position and Scale of the Background Image in %(0-1.0). PosX, PosY, SizeX, SizeY");
+
+  LoadParam<GLMenuImageScreen>(root, "BarImage", this, &GLMenuImageScreen::setBarImage)
+    .describe("sets the image of the LoadingBar");
+  
+  LoadParam<GLMenuImageScreen>(root, "BarPS", this, &GLMenuImageScreen::setBarPosScale)
+    .describe("The Position and Scale of the Loading Bar in %(0-1.0). PosX, PosY, SizeX, SizeY");
+
+  LoadParam<GLMenuImageScreen>(root, "ElementCount", this, &GLMenuImageScreen::setMaximum)
+    .describe("The Count of elements to load into the bar (this is only a maximum value)");
 }
 
@@ -149,4 +132,17 @@
   this->scaleX = scaleX;
   this->scaleY = scaleY;
+}
+
+/*
+  \brief sets position and size of the ImageScreen
+  \param x offset from the top left corner in percent(0-1) of the screensize
+  \param y offset from the top left corner in percent(0-1) of the screensize
+  \param scaleX the scaleing of the image into the x-direction (in percent (0-1))
+  \param scaleY the scaleing of the image into the y-direction (in percent (0-1))
+*/
+void GLMenuImageScreen::setPosScale(float offsetX, float offsetY, float scaleX, float scaleY)
+{
+  this->setPosition(offsetX, offsetY);
+  this->setScale(scaleX, scaleY);
 }
 
Index: orxonox/branches/physics/src/glmenu/glmenu_imagescreen.h
===================================================================
--- orxonox/branches/physics/src/glmenu/glmenu_imagescreen.h	(revision 4178)
+++ orxonox/branches/physics/src/glmenu/glmenu_imagescreen.h	(revision 4283)
@@ -17,6 +17,6 @@
  public:
   GLMenuImageScreen ();
-  GLMenuImageScreen (TiXmlElement* root);
-  void load(TiXmlElement* root);
+  GLMenuImageScreen (const TiXmlElement* root);
+  void loadParams(const TiXmlElement* root);
   virtual ~GLMenuImageScreen ();
 
@@ -28,4 +28,5 @@
   void setPosition(float offsetX, float offsetY);
   void setScale (float scaleX, float scaleY);
+  void setPosScale(float offsetX, float offsetY, float scaleX, float scaleY);
 
   void setBarImage(const char* barImage);
