Index: /code/branches/hud/cmake/FindOGRE.cmake
===================================================================
--- /code/branches/hud/cmake/FindOGRE.cmake	(revision 822)
+++ /code/branches/hud/cmake/FindOGRE.cmake	(revision 823)
@@ -7,5 +7,5 @@
 #  OGRE_FOUND, If false, do not try to use OGRE
 #
-# Copyright © 2007, Matt Williams
+# Copyright � 2007, Matt Williams
 # Modified by Nicolas Schlumberger to make it work on the Tardis-Infrastucture of the ETH Zurich
 #
@@ -18,10 +18,10 @@
 IF (WIN32) #Windows
     MESSAGE(STATUS "Looking for OGRE")
-    SET(OGRE_INCLUDE_DIR ../libs/ogre/OgreMain/include)
-    SET(OGRE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libs/ogre/Samples/Common/bin/Release)
+    SET(OGRE_INCLUDE_DIR /usr/include/OGRE ../libs/ogre/OgreMain/include)
+    SET(OGRE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/usr/include/OGRE ${CMAKE_CURRENT_SOURCE_DIR}/../libs/ogre/Samples/Common/bin/Release)
     SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain)
 ELSE (WIN32) #Unix
     FIND_PACKAGE(PkgConfig)
-    PKG_SEARCH_MODULE(OGRE OGRE /usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/pkgconfig/OGRE.pc) # tardis specific hack
+    PKG_SEARCH_MODULE(OGRE OGRE /usr/include/OGRE /usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/pkgconfig/OGRE.pc) # tardis specific hack
     SET(OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIRS})
     SET(OGRE_LIB_DIR ${OGRE_LIBDIR})
Index: /code/branches/hud/src/orxonox/Orxonox.cc
===================================================================
--- /code/branches/hud/src/orxonox/Orxonox.cc	(revision 822)
+++ /code/branches/hud/src/orxonox/Orxonox.cc	(revision 823)
@@ -43,4 +43,5 @@
 #include <OgreConfigFile.h>
 #include <OgreOverlay.h>
+#include <OgreOverlayContainer.h>
 #include <OgreOverlayManager.h>
 
@@ -73,4 +74,5 @@
 #include "core/Debug.h"
 #include "hud/HUD.h"
+#include "hud/Bar.h"
 #include "objects/weapon/BulletManager.h"
 #include "GraphicsEngine.h"
@@ -382,10 +384,46 @@
     loader_->loadLevel();
 
-    Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
-    HUD* orxonoxHud;
-    orxonoxHud = new HUD();
-    orxonoxHud->setEnergyValue(20);
-    orxonoxHud->setEnergyDistr(20,20,60);
+//    Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
+ //   Ogre::OverlayContainer* cont = Ogre::OverlayManager::createOverlayElement("Orxonox/HUD1.2/MyShip", "Orxonox/HUD1.2/shieldLeftTop", false);
+ //   Ogre::OverlayContainer* cont =  Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2/MapBackGround");
+
+//    hud::Bar* newBar = Ogre::OverlayManager::createOverlayElement("Element", "ElementName");
+//new hud::Bar(1,true,Ogre::ColourValue::Black,"Orxonox/hi");
+ //   cont->addChild(newBar-> element_);
+//   hud::Bar* newBar = Ogre::OverlayManager::createOverlayElement("orxonox/bar", "orxonox/newbar", false);
+
+
+    Ogre::OverlayManager& overlayManager = Ogre::OverlayManager::getSingleton();
+
+    Ogre::Overlay* hudOverlay = overlayManager.create("orxonoxsuperoverlay");
+
+    hud::Bar* newBar = static_cast<hud::Bar*>(overlayManager.createOverlayElement("Panel", "Bar"));
+    newBar->setLeft(0);
+    newBar->setTop(0);
+    newBar->setWidth(10);
+    newBar->setHeight(10);
+    newBar->setMaterialName("Orxonox/Red");
+    newBar->setMetricsMode(Ogre::GMM_PIXELS);
+    newBar->setPercentage(0.8);
+    newBar->show();
+
+
+    Ogre::OverlayContainer* panel = static_cast<Ogre::OverlayContainer*> (overlayManager.createOverlayElement("Panel", "PanelName"));
+    panel->setLeft(10);
+    panel->setTop(10);
+    panel->setWidth(100);
+    panel->setHeight(100);
+    panel->setMetricsMode(Ogre::GMM_PIXELS);
+    panel->show();
+
+    hudOverlay->add2D(panel);
+    panel->addChild(newBar);
+
+ //   HUD* orxonoxHud;
+ //   orxonoxHud = new HUD();
+ //   orxonoxHud->setEnergyValue(20);
+ //   orxonoxHud->setEnergyDistr(20,20,60);
     hudOverlay->show();
+
 
 	/*
Index: /code/branches/hud/src/orxonox/hud/Bar.cc
===================================================================
--- /code/branches/hud/src/orxonox/hud/Bar.cc	(revision 823)
+++ /code/branches/hud/src/orxonox/hud/Bar.cc	(revision 823)
@@ -0,0 +1,68 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Yuning Chai
+*   Co-authors:
+*      ...
+*
+*/
+
+#include <OgreOverlayManager.h>
+#include <OgreOverlayElement.h>
+#include <OgreStringConverter.h>
+#include <OgreColourValue.h>
+#include <string.h>
+
+#include "Bar.h"
+
+namespace hud
+{
+  using namespace Ogre;
+    
+  Bar::Bar(void){}
+  
+  Bar::~Bar(void){}
+  
+  
+/*  void Bar::setPercentage(Ogre::Real percentage){
+    percentage_=percentage;
+    if(horz_){setWidth(int(percentage_* maxLength_));}
+	else {setHeight(int(percentage_ * maxHeight_));}
+    }
+*/
+
+  void Bar::setPercentage(Ogre::Real percentage){
+    percentage_ = percentage;
+//    setWidth(getWidth());
+  }
+
+
+
+  
+  void Bar::setColor(ColourValue color){
+    color_=color;
+    setColour(color);
+  }
+	  
+	
+
+
+
Index: /code/branches/hud/src/orxonox/hud/Bar.h
===================================================================
--- /code/branches/hud/src/orxonox/hud/Bar.h	(revision 823)
+++ /code/branches/hud/src/orxonox/hud/Bar.h	(revision 823)
@@ -0,0 +1,61 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Yuning Chai
+*   Co-authors:
+*      ...
+*
+*/
+
+
+#ifndef _BAR_H__
+#define _BAR_H__
+
+#include <string>
+#include <OgreColourValue.h>
+#include <OgreOverlayElement.h>
+#include <OgrePrerequisites.h>
+#include <string.h>
+#include "../OrxonoxPrereqs.h"
+
+
+
+namespace hud
+{
+  class Bar : public Ogre::OverlayElement
+  {
+  private:
+    float percentage_;
+    bool horz_;
+    Ogre::ColourValue color_;
+
+
+  public:
+    Bar(void);
+    ~Bar(void);
+    void setPercentage(Ogre::Real percentage);
+    void setColor(Ogre::ColourValue color);
+  };
+}
+
+#endif
+
+
Index: /code/branches/hud/src/orxonox/hud/HUD.cc
===================================================================
--- /code/branches/hud/src/orxonox/hud/HUD.cc	(revision 822)
+++ /code/branches/hud/src/orxonox/hud/HUD.cc	(revision 823)
@@ -33,4 +33,5 @@
 
 #include "HUD.h"
+#include "Bar.h"
 
 
