Index: trunk/src/world_entities/weapons/turret.cc
===================================================================
--- trunk/src/world_entities/weapons/turret.cc	(revision 6435)
+++ trunk/src/world_entities/weapons/turret.cc	(revision 6438)
@@ -96,14 +96,4 @@
   this->setEmissionPoint(1.684, 0.472, 0);
   //this->getProjectileFactory()->prepare(100);
-
-  this->bar = new GLGuiBar;
-  this->bar->setSize2D( 20, 100);
-  this->bar->setMaximum(this->getEnergyMax());
-  this->bar->setValue(this->getEnergy());
-  this->loadedBar = new GLGuiBar;
-  this->loadedBar->setParent2D(this->bar);
-  this->loadedBar->setRelCoor2D(20,0);
-  this->loadedBar->setSize2D(10,50);
-  this->loadedBar->setMaximum(this->getLoadedEnergyMax());
 }
 
@@ -116,12 +106,8 @@
 void Turret::activate()
 {
-  this->bar->show();
-  this->loadedBar->show();
 }
 
 void Turret::deactivate()
 {
-  this->bar->hide();
-  this->loadedBar->hide();
 }
 
@@ -156,7 +142,4 @@
   pj->setAbsDir(this->getAbsDir());
   pj->activate();
-
-  this->bar->setValue( this->getEnergy());
-  this->loadedBar->setValue(this->getLoadedEnergy());
 }
 
Index: trunk/src/world_entities/weapons/turret.h
===================================================================
--- trunk/src/world_entities/weapons/turret.h	(revision 6435)
+++ trunk/src/world_entities/weapons/turret.h	(revision 6438)
@@ -8,6 +8,4 @@
 
 #include "weapon.h"
-
-#include "glgui_bar.h"
 
 class Turret : public Weapon
@@ -30,6 +28,4 @@
 
   private:
-    GLGuiBar*    bar;
-    GLGuiBar*    loadedBar;
   };
 
Index: trunk/src/world_entities/weapons/weapon.cc
===================================================================
--- trunk/src/world_entities/weapons/weapon.cc	(revision 6435)
+++ trunk/src/world_entities/weapons/weapon.cc	(revision 6438)
@@ -34,4 +34,6 @@
 #include "sound_buffer.h"
 
+#include "glgui_bar.h"
+
 ////////////////////
 // INITAILISATION //
@@ -75,8 +77,8 @@
   this->stateDuration    = 0.0;                    //< All the States have zero duration
   for (int i = 0; i < WS_STATE_COUNT; i++)         //< Every State has:
-    {
-      this->times[i] = 0.0;                        //< An infinitesimal duration
-      this->animation[i] = NULL;                   //< No animation
-    }
+  {
+    this->times[i] = 0.0;                        //< An infinitesimal duration
+    this->animation[i] = NULL;                   //< No animation
+  }
   for (int i = 0; i < WA_ACTION_COUNT; i++)
     this->soundBuffers[i] = NULL;                  //< No Sounds
@@ -98,4 +100,7 @@
   this->energyMax = 10.0;                          //< How much energy can be carried
   this->capability = WTYPE_ALL;                    //< The Weapon has all capabilities @see W_Capability.
+
+  this->energyWidget = NULL;
+  this->energyLoadedWidget = NULL;
 }
 
@@ -109,14 +114,14 @@
 
   LoadParam(root, "projectile", this, Weapon, setProjectileType)
-      .describe("Sets the name of the Projectile to load onto the Entity");
+  .describe("Sets the name of the Projectile to load onto the Entity");
 
   LoadParam(root, "emission-point", this, Weapon, setEmissionPoint)
-      .describe("Sets the Point of emission of this weapon");
+  .describe("Sets the Point of emission of this weapon");
 
   LoadParam(root, "state-duration", this, Weapon, setStateDuration)
-      .describe("Sets the duration of a given state (1: state-Name; 2: duration in seconds)");
+  .describe("Sets the duration of a given state (1: state-Name; 2: duration in seconds)");
 
   LoadParam(root, "action-sound", this, Weapon, setActionSound)
-      .describe("Sets a given sound to an action (1: action-Name; 2: name of the sound (relative to the Data-Path))");
+  .describe("Sets a given sound to an action (1: action-Name; 2: name of the sound (relative to the Data-Path))");
 }
 
@@ -271,4 +276,44 @@
 }
 
+GLGuiWidget* Weapon::getEnergyWidget()
+{
+  if (this->energyWidget == NULL)
+  {
+    this->energyWidget = new GLGuiBar;
+    this->energyWidget->setSize2D( 20, 100);
+    this->energyWidget->setMaximum(this->getEnergyMax());
+    this->energyWidget->setValue(this->getEnergy());
+  }
+  return this->energyWidget;
+}
+
+
+GLGuiWidget* Weapon::getMaxEnergyWidget()
+{
+  if (this->energyLoadedWidget == NULL)
+  {
+    this->energyLoadedWidget = new GLGuiBar;
+    //this->energyLoadedWidget->setParent2D(this->bar);
+    this->energyLoadedWidget->setRelCoor2D(20,0);
+    this->energyLoadedWidget->setSize2D(10,50);
+    this->energyLoadedWidget->setMaximum(this->getLoadedEnergyMax());
+  }
+  return this->energyLoadedWidget;
+}
+
+void Weapon::updateWidgets()
+{
+  if (this->energyWidget != NULL)
+  {
+    this->energyWidget->setMaximum(this->energyMax);
+    this->energyWidget->setValue(this->energy);
+  }
+  if (this->energyLoadedWidget != NULL)
+  {
+    this->energyLoadedWidget->setMaximum(this->energyLoadedMax);
+    this->energyLoadedWidget->setValue(this->energyLoaded);
+  }
+}
+
 /////////////////
 //  EXECUTION  //
@@ -371,10 +416,10 @@
 bool Weapon::activateW()
 {
-//  if (this->currentState == WS_INACTIVE)
+  //  if (this->currentState == WS_INACTIVE)
   {
     // play Sound
     if (likely(this->soundBuffers[WA_ACTIVATE] != NULL))
       this->soundSource->play(this->soundBuffers[WA_ACTIVATE]);
-        // activate
+    // activate
     PRINTF(4)("Activating the Weapon %s\n", this->getName());
     this->activate();
@@ -390,8 +435,8 @@
 bool Weapon::deactivateW()
 {
-//  if (this->currentState != WS_INACTIVE)
+  //  if (this->currentState != WS_INACTIVE)
   {
     PRINTF(4)("Deactivating the Weapon %s\n", this->getName());
-        // play Sound
+    // play Sound
     if (this->soundBuffers[WA_DEACTIVATE] != NULL)
       this->soundSource->play(this->soundBuffers[WA_DEACTIVATE]);
@@ -410,11 +455,11 @@
   if ( this->currentState != WS_INACTIVE && this->energyLoaded >= this->minCharge)
   {
-        // playing Sound
+    // playing Sound
     if (this->soundBuffers[WA_CHARGE] != NULL)
       this->soundSource->play(this->soundBuffers[WA_CHARGE]);
 
-        // charge
+    // charge
     this->charge();
-        // setting up for the next state
+    // setting up for the next state
     this->enterState(WS_CHARGING);
   }
@@ -431,14 +476,14 @@
 bool Weapon::fireW()
 {
-     //if (likely(this->currentState != WS_INACTIVE))
+  //if (likely(this->currentState != WS_INACTIVE))
   if (this->minCharge <= this->energyLoaded)
   {
-          // playing Sound
+    // playing Sound
     if (this->soundBuffers[WA_SHOOT] != NULL)
       this->soundSource->play(this->soundBuffers[WA_SHOOT]);
-          // fire
+    // fire
     this->energyLoaded -= this->minCharge;
     this->fire();
-          // setting up for the next state
+    // setting up for the next state
     this->enterState(WS_SHOOTING);
   }
@@ -546,5 +591,5 @@
   bool retVal = true;
 
-//  if (this->projectile == NULL)
+  //  if (this->projectile == NULL)
   {
     PRINTF(1)("There was no projectile assigned to the Weapon.\n");
@@ -565,5 +610,5 @@
   PRINT(0)("Weapon-Debug %s, state: %s (duration: %fs), nextAction: %s\n", this->getName(), Weapon::stateToChar(this->currentState), this->stateDuration, Weapon::actionToChar(requestedAction));
   PRINT(0)("Energy: max: %f; current: %f;  loadedMax: %f; loadedCurrent: %f; chargeMin: %f, chargeMax %f\n",
-            this->energyMax, this->energy, this->energyLoadedMax, this->energyLoaded, this->minCharge, this->maxCharge);
+           this->energyMax, this->energy, this->energyLoadedMax, this->energyLoaded, this->minCharge, this->maxCharge);
 
 
@@ -595,8 +640,8 @@
     return WA_SPECIAL1;
   else
-    {
-      PRINTF(2)("action %s could not be identified.\n", action);
-      return WA_NONE;
-    }
+  {
+    PRINTF(2)("action %s could not be identified.\n", action);
+    return WA_NONE;
+  }
 }
 
@@ -658,8 +703,8 @@
     return WS_IDLE;
   else
-    {
-      PRINTF(2)("state %s could not be identified.\n", state);
-      return WS_NONE;
-    }
+  {
+    PRINTF(2)("state %s could not be identified.\n", state);
+    return WS_NONE;
+  }
 }
 
Index: trunk/src/world_entities/weapons/weapon.h
===================================================================
--- trunk/src/world_entities/weapons/weapon.h	(revision 6435)
+++ trunk/src/world_entities/weapons/weapon.h	(revision 6438)
@@ -24,4 +24,5 @@
 class FastFactory;
 template<class T> class tFastFactory;
+class GLGuiWidget;
 
 //! An enumerator defining Actions a Weapon can take
@@ -148,4 +149,7 @@
     Animation3D* copyAnimation(WeaponState from, WeaponState to);
 
+    GLGuiWidget* getEnergyWidget();
+    GLGuiWidget* getMaxEnergyWidget();
+
     // FLOW
     void tick(float dt); //!< this is a function that must be called by the weaponManager, or any other weaponHandler, all other functions are handled from within
@@ -183,7 +187,7 @@
     bool fireW();
     bool reloadW();
-
     inline void enterState(WeaponState state);
 
+    void updateWidgets();
 
   private:
@@ -200,4 +204,7 @@
     float                maxCharge;                        //!< The maximal energy to be loaded onto one projectile (this is only availible if chargeable is enabled)
 
+    GLGuiBar*            energyWidget;
+    GLGuiBar*            energyLoadedWidget;
+
     ////////////
     // PHASES //
