Index: branches/playability/src/lib/gui/gl/glgui_bar.cc
===================================================================
--- branches/playability/src/lib/gui/gl/glgui_bar.cc	(revision 10138)
+++ branches/playability/src/lib/gui/gl/glgui_bar.cc	(revision 10139)
@@ -71,5 +71,5 @@
 
     this->_value = value;
-    this->_frontRect.setSize((this->getSizeX2D() - borderLeft() - borderRight()) * (_value -_minimum)/ (_minimum + _maximum)
+    this->_frontRect.setSize((this->getSizeX2D() - borderLeft() - borderRight()) * (_value - _minimum) / (_maximum -_minimum)
         ,this->getSizeY2D() - borderTop() - borderBottom());
   }
@@ -99,6 +99,6 @@
 
     this->_frontRect.setTopLeft(borderLeft(), borderTop());
-    this->_frontRect.setSize((this->getSizeX2D() - borderLeft() - borderRight()) * (_value -_minimum)/ (_minimum + _maximum)
-                             ,this->getSizeY2D() - borderTop() - borderBottom());
+    this->_frontRect.setSize((this->getSizeX2D() - borderLeft() - borderRight()) * (_value - _minimum) / (_maximum -_minimum)
+        ,this->getSizeY2D() - borderTop() - borderBottom());
 
   }
Index: branches/playability/src/lib/gui/gl/glgui_box.cc
===================================================================
--- branches/playability/src/lib/gui/gl/glgui_box.cc	(revision 10138)
+++ branches/playability/src/lib/gui/gl/glgui_box.cc	(revision 10139)
@@ -18,5 +18,7 @@
 #include "glgui_box.h"
 #include <cassert>
+#include <iostream>
 #include "debug.h"
+#include "network_log.h"
 
 namespace OrxGui
@@ -177,5 +179,5 @@
   void GLGuiBox::resize()
   {
-    if (orientation() == OrxGui::Vertical)
+    if (this->orientation() == OrxGui::Vertical)
     {
       float height = borderTop();
@@ -186,7 +188,11 @@
       for (widget = this->_children.begin(); widget != this->_children.end(); ++widget)
       {
-        (*widget)->setRelCoor2D(borderLeft(), height);
-        height += (*widget)->getSizeY2D();
-        width = fmax(width, (*widget)->getSizeX2D());
+        float radDir = (*widget)->getAbsDir2D() * 2 * M_PI / 360;
+        float realSizeX = fabsf((*widget)->getSizeX2D() * cosf(radDir)) + fabsf((*widget)->getSizeY2D() * sinf(radDir));
+        float realSizeY = fabsf((*widget)->getSizeX2D() * sinf(radDir)) + fabsf((*widget)->getSizeY2D() * cosf(radDir));
+
+        (*widget)->setRelCoor2D(borderLeft(), height + borderTop());
+        height += realSizeY;
+        width = fmax(width, realSizeX);
       }
 
@@ -205,7 +211,12 @@
       for (widget = this->_children.begin(); widget != this->_children.end(); ++widget)
       {
+        float radDir = (*widget)->getAbsDir2D() * 2 * M_PI / 360;
+        //std::cout << "size X: " << (*widget)->getSizeX2D() << "size Y: " << (*widget)->getSizeY2D() << '\n';
+        float realSizeX = fabsf((*widget)->getSizeX2D() * cosf(radDir)) + fabsf((*widget)->getSizeY2D() * sinf(radDir));
+        float realSizeY = fabsf((*widget)->getSizeX2D() * sinf(radDir)) + fabsf((*widget)->getSizeY2D() * cosf(radDir));
+
         (*widget)->setRelCoor2D(width, borderTop());
-        height = fmax(height, (*widget)->getSizeY2D());
-        width += (*widget)->getSizeX2D();
+        height = fmax(height, realSizeY);
+        width += realSizeX;
       }
 
Index: branches/playability/src/util/hud.cc
===================================================================
--- branches/playability/src/util/hud.cc	(revision 10138)
+++ branches/playability/src/util/hud.cc	(revision 10139)
@@ -65,6 +65,5 @@
   this->subscribeEvent(ES_ALL, SDLK_TAB);
 
-  this->shipValuesBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
-  this->shipValuesBox->setBackgroundTexture("maps/gui_container_background.png");
+  this->shipValuesBox = NULL;
 }
 
@@ -79,4 +78,6 @@
 
   delete this->_radar;
+  delete this->shipValuesBox;
+
   // delete what has to be deleted here
 }
@@ -98,4 +99,6 @@
 void Hud::setEnergyWidget(OrxGui::GLGuiWidget* widget)
 {
+  if (this->shipValuesBox == NULL)
+    this->createShipValuesBox();
   // decopple old widget
   if (this->energyWidget != NULL)
@@ -107,8 +110,8 @@
   if (this->energyWidget != NULL)
   {
-    this->energyWidget->show();
-    this->energyWidget->shiftDir2D(270);
+    //this->energyWidget->shiftDir2D(270);
     dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->energyWidget)->setDisplayedName("Electronics");
     this->shipValuesBox->pack(this->energyWidget);
+    this->energyWidget->show();
     /*    this->energyWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
         this->energyWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/
@@ -120,4 +123,6 @@
 void Hud::setShiledWidget(OrxGui::GLGuiWidget* widget)
 {
+  if (this->shipValuesBox == NULL)
+    this->createShipValuesBox();
   // decopple old widget
   if (this->shieldWidget != NULL)
@@ -129,10 +134,12 @@
   if (this->shieldWidget != NULL)
   {
+    //this->shieldWidget->shiftDir2D(270);
+    this->shipValuesBox->pack(this->shieldWidget);
     this->shieldWidget->show();
-    this->shieldWidget->shiftDir2D(270);
-    this->shipValuesBox->pack(this->shieldWidget);
     /*    this->shieldWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
         this->shieldWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/
   }
+  else
+    printf("schild im hud nicht uebergeben!!!!!!!!!!!!!!!!!!!!!!!!!");
 
   this->updateResolution();
@@ -141,4 +148,7 @@
 void Hud::setArmorWidget(OrxGui::GLGuiWidget* widget)
 {
+  if (this->shipValuesBox == NULL)
+    this->createShipValuesBox();
+
 // decopple old widget
   if (this->armorWidget != NULL)
@@ -150,7 +160,7 @@
   if (this->armorWidget != NULL)
   {
+    //this->armorWidget->shiftDir2D(270);
+    this->shipValuesBox->pack(this->armorWidget);
     this->armorWidget->show();
-    this->armorWidget->shiftDir2D(270);
-    //this->shipValuesBox->pack(this->armorWidget);
     /*    this->armorWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
         this->armorWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/
@@ -272,7 +282,9 @@
   if (this->shipValuesBox != NULL)
   {
-    this->shipValuesBox->setAbsCoor2D(0.8 * this->resX, 0.85 * this->resY);
+    this->shipValuesBox->setAbsCoor2D(0.2 * this->resX, 0.4 * this->resY);
     this->shipValuesBox->setWidgetSize(.4 * this->resX, 0.1 * this->resY);
   }
+  else
+    createShipValuesBox();
 
 
@@ -309,7 +321,15 @@
   //  this->inputLine->select();
   }
-
-
-}
-
-
+}
+
+void Hud::createShipValuesBox()
+{
+  this->shipValuesBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+  //this->shipValuesBox->setWidgetSize(1000,500);
+  //this->shipValuesBox->setBackgroundTexture("maps/gui_container_background.png");
+  this->shipValuesBox->setBackgroundTexture(Texture());
+  this->shipValuesBox->setBackgroundColor(Color(0,0,1,0.5));
+  this->shipValuesBox->setVisibility(true);
+}
+
+
Index: branches/playability/src/util/hud.h
===================================================================
--- branches/playability/src/util/hud.h	(revision 10138)
+++ branches/playability/src/util/hud.h	(revision 10139)
@@ -40,4 +40,8 @@
   void setShiledWidget(OrxGui::GLGuiWidget* widget);
   void setArmorWidget(OrxGui::GLGuiWidget* widget);
+  inline OrxGui::GLGuiWidget* getEnergyWidget() {return this->energyWidget;};
+  inline OrxGui::GLGuiWidget* getShieldWidget() {return this->shieldWidget;};
+  inline OrxGui::GLGuiWidget* getArmorWidget() {return this->armorWidget;};
+
   void setWeaponManager(WeaponManager* weaponMan, WeaponManager* weaponManSec = NULL);
 
@@ -55,4 +59,5 @@
   private:
     void updateResolution();
+    void createShipValuesBox();
 
 private:
Index: branches/playability/src/world_entities/elements/glgui_energywidgetvertical.cc
===================================================================
--- branches/playability/src/world_entities/elements/glgui_energywidgetvertical.cc	(revision 10138)
+++ branches/playability/src/world_entities/elements/glgui_energywidgetvertical.cc	(revision 10139)
@@ -29,10 +29,10 @@
     //   this->setClassID(CL_PROTO_ID, "GLGuiEnergyWidget");
 
-    
-
-    this->_bar.setSize2D(100, 30);
-    this->_name.setRelCoor2D(200,0);
-    this->_valueText.setRelCoor2D(22,0);
-
+    //this->_bar.setSize2D(100, 30);
+    //this->_bar.setRelCoor2D(-10,0);
+    //this->_name.setRelCoor2D(20,0);
+    //this->_valueText.setRelCoor2D(,0);
+    this->shiftDir2D(270);
+    this->setOrientation(OrxGui::Horizontal);
     this->pack(&this->_name);
     this->pack(&this->_valueText);
@@ -44,5 +44,5 @@
 
     this->setBackgroundTexture(Texture());
-    this->setBackgroundColor(Color(.5,.5,.5,0));
+    this->setBackgroundColor(Color(.5,.5,.5,0.5));
 
     //this->_name.setBackgroundTexture(Texture());
Index: branches/playability/src/world_entities/space_ships/space_ship.cc
===================================================================
--- branches/playability/src/world_entities/space_ships/space_ship.cc	(revision 10138)
+++ branches/playability/src/world_entities/space_ships/space_ship.cc	(revision 10139)
@@ -232,4 +232,5 @@
 
   // widget handling
+  /*
   this->electronicWidget = new OrxGui::GLGuiEnergyWidgetVertical();
   this->electronicWidget->setDisplayedName(std::string(this->getClassName()) + " Electronics:");
@@ -249,4 +250,7 @@
     State::getPlayer()->hud().setEnergyWidget(this->electronicWidget);
   }
+  */
+  this->electronicWidget = NULL;
+  this->shieldWidget = NULL;
 
   //add events to the eventlist
@@ -392,4 +396,5 @@
   this->secWeaponMan.showCrosshair();
   this->toList( OM_GROUP_01 );
+  dynamic_cast <OrxGui::GLGuiEnergyWidgetVertical*> (State::getPlayer()->hud().getArmorWidget())->setDisplayedName("Armor");
   //dynamic_cast<Element2D*>(this->secWeaponMan.getFixedTarget())->setVisibility( true);
   //this->attachCamera();
@@ -1014,15 +1019,37 @@
 void SpaceShip::updateElectronicWidget()
 {
-  this->electronicWidget->setMaximum(this->electronicMax);
-  this->electronicWidget->setValue(this->electronicCur);
-  if (this->hasPlayer())
-    this->electronicWidget->show();
+  if (this->electronicWidget != NULL)
+  { //if it exists already: update it
+     this->electronicWidget->setMaximum(this->electronicMax);
+     this->electronicWidget->setValue(this->electronicCur);
+  }
+  else
+  { //create the widget
+    this->electronicWidget = new OrxGui::GLGuiEnergyWidgetVertical();
+    this->electronicWidget->setDisplayedName("Electronics:");
+    //this->electronicWidget->setSize2D(100,20);
+    //this->electronicWidget->setAbsCoor2D(150,200);
+    this->updateElectronicWidget();
+    if (this->hasPlayer())
+      State::getPlayer()->hud().setEnergyWidget(this->electronicWidget);
+  }
 }
 
 void SpaceShip::updateShieldWidget()
 {
-  this->shieldWidget->setMaximum(this->shieldMax);
-  this->shieldWidget->setValue(this->shieldCur);
-  if (this->hasPlayer())
-    this->shieldWidget->show();
-}
+  if (this->shieldWidget != NULL)
+  { 
+    this->shieldWidget->setMaximum(this->shieldMax);
+    this->shieldWidget->setValue(this->shieldCur);;
+  }
+  else
+  {
+    this->shieldWidget = new OrxGui::GLGuiEnergyWidgetVertical();
+    this->shieldWidget->setDisplayedName("Shield:");
+    //his->shieldWidget->setSize2D(100,20);
+    //this->shieldWidget->setAbsCoor2D(200,200);
+    this->updateShieldWidget();
+    if (this->hasPlayer())
+      State::getPlayer()->hud().setShiledWidget(this->shieldWidget);
+  }
+}
Index: branches/playability/src/world_entities/world_entity.cc
===================================================================
--- branches/playability/src/world_entities/world_entity.cc	(revision 10138)
+++ branches/playability/src/world_entities/world_entity.cc	(revision 10139)
@@ -752,7 +752,7 @@
   {
     this->healthWidget = new OrxGui::GLGuiEnergyWidgetVertical();
-    this->healthWidget->setDisplayedName("Electronics");
-    this->healthWidget->setSize2D(30,400);
-    this->healthWidget->setAbsCoor2D(100,200);
+    this->healthWidget->setDisplayedName("Health");
+    //this->healthWidget->setSize2D(100,20);
+    //this->healthWidget->setAbsCoor2D(100,200);
 
     this->updateHealthWidget();
