Index: branches/playability/src/lib/gui/gl/glgui_box.cc
===================================================================
--- branches/playability/src/lib/gui/gl/glgui_box.cc	(revision 10193)
+++ branches/playability/src/lib/gui/gl/glgui_box.cc	(revision 10194)
@@ -22,4 +22,5 @@
 #include "network_log.h"
 
+
 namespace OrxGui
 {
@@ -188,7 +189,23 @@
       for (widget = this->_children.begin(); widget != this->_children.end(); ++widget)
       {
-        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));
+        //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));
+        float realSizeX, realSizeY;
+        int angleAbs = (int)(*widget)->getAbsDir2D();
+        int angleRel = (int)(*widget)->getRelDir2D();
+        //std::cout << "absangle: " << angleAbs << ", relangle: " << angleRel << '\n';
+        if ((*widget)->getAbsDir2D() == 0 || (*widget)->getAbsDir2D() == 180)
+        {
+          realSizeX = (*widget)->getSizeX2D();
+          realSizeY = (*widget)->getSizeY2D();
+          //std::cout<<"box vertical, widget 0or180";
+        }
+        else if ((*widget)->getAbsDir2D() == 90 || (*widget)->getAbsDir2D() == 270)
+        {
+          realSizeX = (*widget)->getSizeY2D();
+          realSizeY = (*widget)->getSizeX2D();
+          //std::cout<<"box vertical, widget 90or270";
+        }
 
         (*widget)->setRelCoor2D(borderLeft(), height + borderTop());
@@ -211,8 +228,24 @@
       for (widget = this->_children.begin(); widget != this->_children.end(); ++widget)
       {
-        float radDir = (*widget)->getAbsDir2D() * 2 * M_PI / 360;
+        //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));
+        //float realSizeX = fabsf((*widget)->getSizeX2D() * cosf(radDir)) + fabsf((*widget)->getSizeY2D() * sinf(radDir));
+        //float realSizeY = fabsf((*widget)->getSizeX2D() * sinf(radDir)) + fabsf((*widget)->getSizeY2D() * cosf(radDir));
+        float realSizeX, realSizeY;
+        int angleAbs = (int)(*widget)->getAbsDir2D();
+        int angleRel = (int)(*widget)->getRelDir2D();
+        //std::cout << "absangle: " << angleAbs << ", relangle: " << angleRel << '\n';
+        if ((*widget)->getAbsDir2D() == 0 || (*widget)->getAbsDir2D() == 180)
+        {
+          realSizeX = (*widget)->getSizeX2D();
+          realSizeY = (*widget)->getSizeY2D();
+          //std::cout<<"box horicontal, widget 0or180";
+        }
+        else if ((*widget)->getAbsDir2D() == 90 || (*widget)->getAbsDir2D() == 270)
+        {
+          realSizeX = (*widget)->getSizeY2D();
+          realSizeY = (*widget)->getSizeX2D();
+          //std::cout<<"box horicontal, widget 90or270";
+        }
 
         (*widget)->setRelCoor2D(width, borderTop());
Index: branches/playability/src/util/hud.cc
===================================================================
--- branches/playability/src/util/hud.cc	(revision 10193)
+++ branches/playability/src/util/hud.cc	(revision 10194)
@@ -65,5 +65,5 @@
   this->subscribeEvent(ES_ALL, SDLK_TAB);
 
-  this->shipValuesBox = NULL;
+  //this->shipValuesBox = NULL;
 }
 
@@ -78,5 +78,6 @@
 
   delete this->_radar;
-  delete this->shipValuesBox;
+  //if (this->shipValuesBox != NULL)
+    //delete this->shipValuesBox;
 
   // delete what has to be deleted here
@@ -99,6 +100,7 @@
 void Hud::setEnergyWidget(OrxGui::GLGuiWidget* widget)
 {
-  if (this->shipValuesBox == NULL)
-    this->createShipValuesBox();
+  //if (this->shipValuesBox == NULL)
+    //this->createShipValuesBox();
+
   // decopple old widget
   if (this->energyWidget != NULL)
@@ -111,6 +113,6 @@
   {
     //this->energyWidget->shiftDir2D(270);
-    dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->energyWidget)->setDisplayedName("Electronics");
-    this->shipValuesBox->pack(this->energyWidget);
+    //dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->energyWidget)->setDisplayedName("Electronics");
+    //this->shipValuesBox->pack(this->energyWidget);
     this->energyWidget->show();
     /*    this->energyWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
@@ -123,6 +125,9 @@
 void Hud::setShiledWidget(OrxGui::GLGuiWidget* widget)
 {
+  /*
   if (this->shipValuesBox == NULL)
     this->createShipValuesBox();
+  */
+
   // decopple old widget
   if (this->shieldWidget != NULL)
@@ -135,5 +140,5 @@
   {
     //this->shieldWidget->shiftDir2D(270);
-    this->shipValuesBox->pack(this->shieldWidget);
+    //this->shipValuesBox->pack(this->shieldWidget);
     this->shieldWidget->show();
     /*    this->shieldWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
@@ -148,6 +153,8 @@
 void Hud::setArmorWidget(OrxGui::GLGuiWidget* widget)
 {
+  /*
   if (this->shipValuesBox == NULL)
     this->createShipValuesBox();
+  */
 
 // decopple old widget
@@ -161,5 +168,5 @@
   {
     //this->armorWidget->shiftDir2D(270);
-    this->shipValuesBox->pack(this->armorWidget);
+    //this->shipValuesBox->pack(this->armorWidget);
     this->armorWidget->show();
     /*    this->armorWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
@@ -277,7 +284,16 @@
     this->_radar->setRange(300);
     this->_radar->show();
-  }
-
-  
+
+    if (this->armorWidget != NULL)
+      this->armorWidget->setRelCoor2D(0.1*this->resX, this->armorWidget->getSizeX2D());
+    if (this->shieldWidget != NULL)
+      this->shieldWidget->setRelCoor2D(0.1*this->resX + this->armorWidget->getSizeY2D(), this->armorWidget->getSizeX2D());
+    if (this->energyWidget != NULL)
+      this->energyWidget->setRelCoor2D(0.1*this->resX + this->armorWidget->getSizeY2D() + this->shieldWidget->getSizeY2D(), this->armorWidget->getSizeX2D());
+    //this->shieldWidget->setRelCoor2D(0.1*this->resX + this->armorWidget->getSizeX2D(),0);
+    //this->energyWidget->setRelCoor2D(0.1*this->resX + this->armorWidget->getSizeX2D() + this->shieldWidget->getSizeX2D(),0);
+  }
+
+  /*
   if (this->shipValuesBox != NULL)
   {
@@ -287,5 +303,5 @@
   else
     createShipValuesBox();
-
+  */
 
   std::list<OrxGui::GLGuiWidget*>::iterator weaponWidget;
@@ -323,7 +339,8 @@
 }
 
+/*
 void Hud::createShipValuesBox()
 {
-  this->shipValuesBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
+  this->shipValuesBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
   //this->shipValuesBox->setWidgetSize(1000,500);
   //this->shipValuesBox->setBackgroundTexture("maps/gui_container_background.png");
@@ -332,4 +349,5 @@
   this->shipValuesBox->setVisibility(true);
 }
-
-
+*/
+
+
Index: branches/playability/src/util/hud.h
===================================================================
--- branches/playability/src/util/hud.h	(revision 10193)
+++ branches/playability/src/util/hud.h	(revision 10194)
@@ -59,5 +59,5 @@
   private:
     void updateResolution();
-    void createShipValuesBox();
+    //void createShipValuesBox();
 
 private:
@@ -68,5 +68,5 @@
   OrxGui::GLGuiWidget*     shieldWidget;
   OrxGui::GLGuiWidget*     armorWidget;
-  OrxGui::GLGuiBox*        shipValuesBox;
+  //OrxGui::GLGuiBox*        shipValuesBox;
 
   OrxGui::GLGuiNotifier*   notifier;
Index: branches/playability/src/world_entities/elements/glgui_energywidgetvertical.cc
===================================================================
--- branches/playability/src/world_entities/elements/glgui_energywidgetvertical.cc	(revision 10193)
+++ branches/playability/src/world_entities/elements/glgui_energywidgetvertical.cc	(revision 10194)
@@ -19,4 +19,6 @@
 
 #include "multi_type.h"
+#include <iostream>
+#include "math.h"
 
 namespace OrxGui
@@ -33,19 +35,30 @@
     //this->_name.setRelCoor2D(20,0);
     //this->_valueText.setRelCoor2D(,0);
-    this->shiftDir2D(270);
-    this->setOrientation(OrxGui::Horizontal);
-    this->pack(&this->_name);
-    this->pack(&this->_valueText);
-    this->_bar.setParent2D(&this->_valueText);
+    this->setAbsDir2D(270);
+    //std::cout << "absAngle: " << int(this->getAbsDir2D()) << ", relAngle: " << int(this->getRelDir2D()) << '\n';
+    //this->setOrientation(OrxGui::Vertical);
 
-    this->_name.setForegroundColor(Color(1,1,1,.8));
+    //this->pack(&this->_name);
+    //this->pack(&this->_valueText);
+
+    this->_image.setParent2D(this);
+    this->_image.setSize2D(20,20);
+    this->_image.setBackgroundColor(Color(1,1,1,.8));
+    this->_image.setBackgroundTexture("maps/TE2.png");
+    this->_image.setRelCoor2D(borderLeft(), borderTop() + this->_bar.getSizeX2D());
+
+    this->_valueText.setParent2D(this);
+    this->_valueText.setSize2D(100,20);
+    this->_valueText.setRelCoor2D(borderLeft(), borderTop() + this->_bar.getSizeX2D());
     this->_valueText.setChangedTextColor(Color::white);
-    this->_bar.setBackgroundTexture(Texture());
 
     this->setBackgroundTexture(Texture());
-    this->setBackgroundColor(Color(.5,.5,.5,0.5));
+    this->setBackgroundColor(Color(.5,.5,.5,0));
+    this->setSize2D(120,20);
 
     //this->_name.setBackgroundTexture(Texture());
     //this->_valueText.setBackgroundTexture("maps/gui_element_background_2.png");
+
+    this->_bar.setParent2D(&this->_valueText);
     this->_bar.setBackgroundTexture(Texture());
     this->_bar.setBackgroundColor(Color(0,0,0,0));
@@ -53,4 +66,6 @@
     this->_bar.setForegroundColor(Color(.5, .5, .5, 1));
     this->_bar.setChangedValueColor(Color::black);
+    this->_bar.setSize2D(100,20);
+    this->_bar.setRelCoor2D(borderLeft(), 0);
   }
 
@@ -61,11 +76,4 @@
   GLGuiEnergyWidgetVertical::~GLGuiEnergyWidgetVertical ()
   {
-  }
-
-
-  void GLGuiEnergyWidgetVertical::setDisplayedName(const std::string& name)
-  {
-    this->_name.setText(name);
-    this->_bar.setWidgetSize(this->_name.getSize2D());
   }
 
@@ -85,9 +93,10 @@
     this->_bar.setFrontColor(Color(1,1,1,1), true);
     this->_valueText.setText(val.getString());
+    //this->_valueText.setText("asdfas");
   }
 
   void GLGuiEnergyWidgetVertical::resize()
   {
-    GLGuiBox::resize();
+    //GLGuiBox::resize();
   }
 
@@ -95,5 +104,5 @@
   void GLGuiEnergyWidgetVertical::showing()
   {
-    this->_name.show();
+    this->_image.show();
     this->_valueText.show();
     this->_bar.show();
@@ -102,5 +111,5 @@
   void GLGuiEnergyWidgetVertical::hiding()
   {
-    this->_name.hide();
+    this->_image.hide();
     this->_valueText.hide();
     this->_bar.hide();
Index: branches/playability/src/world_entities/elements/glgui_energywidgetvertical.h
===================================================================
--- branches/playability/src/world_entities/elements/glgui_energywidgetvertical.h	(revision 10193)
+++ branches/playability/src/world_entities/elements/glgui_energywidgetvertical.h	(revision 10194)
@@ -10,4 +10,5 @@
 #include "glgui_bar.h"
 #include "glgui_text.h"
+#include "glgui_widget.h"
 
 namespace OrxGui
@@ -15,5 +16,5 @@
 
   //! A class for ...
-  class GLGuiEnergyWidgetVertical : public GLGuiBox
+  class GLGuiEnergyWidgetVertical : public GLGuiWidget
   {
 
@@ -22,9 +23,8 @@
     virtual ~GLGuiEnergyWidgetVertical();
 
-    void setDisplayedName(const std::string& name);
     void setMaximum(float max);
     void setValue(float value);
 
-    inline GLGuiWidget* getNameWidget() {return &this->_name;};
+    inline GLGuiWidget* getImageWidget() {return &this->_image;};
     inline GLGuiWidget* getValueWidget() {return &this->_valueText;};
     inline GLGuiWidget* getBarWidget() {return &this->_bar;};
@@ -36,5 +36,5 @@
 
   private:
-    GLGuiText               _name;
+    GLGuiWidget             _image;
     GLGuiText               _valueText;
     GLGuiBar                _bar;
Index: branches/playability/src/world_entities/space_ships/space_ship.cc
===================================================================
--- branches/playability/src/world_entities/space_ships/space_ship.cc	(revision 10193)
+++ branches/playability/src/world_entities/space_ships/space_ship.cc	(revision 10194)
@@ -416,5 +416,5 @@
   this->secWeaponMan.showCrosshair();
   this->toList( OM_GROUP_01 );
-  dynamic_cast <OrxGui::GLGuiEnergyWidgetVertical*> (State::getPlayer()->hud().getArmorWidget())->setDisplayedName("Armor");
+  //dynamic_cast <OrxGui::GLGuiEnergyWidgetVertical*> (State::getPlayer()->hud().getArmorWidget())->setDisplayedName("Armor");
   //dynamic_cast<Element2D*>(this->secWeaponMan.getFixedTarget())->setVisibility( true);
   //this->attachCamera();
@@ -1047,5 +1047,5 @@
   { //create the widget
     this->electronicWidget = new OrxGui::GLGuiEnergyWidgetVertical();
-    this->electronicWidget->setDisplayedName("Electronics:");
+    //this->electronicWidget->setDisplayedName("Electronics:");
     //this->electronicWidget->setSize2D(100,20);
     //this->electronicWidget->setAbsCoor2D(150,200);
@@ -1066,5 +1066,5 @@
   {
     this->shieldWidget = new OrxGui::GLGuiEnergyWidgetVertical();
-    this->shieldWidget->setDisplayedName("Shield:");
+    //this->shieldWidget->setDisplayedName("Shield:");
     //his->shieldWidget->setSize2D(100,20);
     //this->shieldWidget->setAbsCoor2D(200,200);
Index: branches/playability/src/world_entities/world_entity.cc
===================================================================
--- branches/playability/src/world_entities/world_entity.cc	(revision 10193)
+++ branches/playability/src/world_entities/world_entity.cc	(revision 10194)
@@ -752,5 +752,5 @@
   {
     this->healthWidget = new OrxGui::GLGuiEnergyWidgetVertical();
-    this->healthWidget->setDisplayedName("Health");
+    //this->healthWidget->setDisplayedName("Health");
     //this->healthWidget->setSize2D(100,20);
     //this->healthWidget->setAbsCoor2D(100,200);
