Index: code/branches/libraries2/src/modules/CMakeLists.txt
===================================================================
--- code/branches/libraries2/src/modules/CMakeLists.txt	(revision 5719)
+++ code/branches/libraries2/src/modules/CMakeLists.txt	(revision 5720)
@@ -21,2 +21,3 @@
 
 ADD_SUBDIRECTORY(gamestates)
+ADD_SUBDIRECTORY(overlays)
Index: code/branches/libraries2/src/modules/overlays/CMakeLists.txt
===================================================================
--- code/branches/libraries2/src/modules/overlays/CMakeLists.txt	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/CMakeLists.txt	(revision 5720)
@@ -0,0 +1,19 @@
+SET_SOURCE_FILES(OVERLAYS_SRC_FILES
+  OverlayText.cc
+  FadeoutText.cc
+  GUIOverlay.cc
+)
+
+ADD_SUBDIRECTORY(debug)
+ADD_SUBDIRECTORY(hud)
+ADD_SUBDIRECTORY(stats)
+
+ORXONOX_ADD_LIBRARY(overlays
+  MODULE
+  FIND_HEADER_FILES
+  DEFINE_SYMBOL
+    "OVERLAYS_SHARED_BUILD"
+  LINK_LIBRARIES
+    orxonox
+  SOURCE_FILES ${OVERLAYS_SRC_FILES}
+)
Index: code/branches/libraries2/src/modules/overlays/FadeoutText.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/FadeoutText.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/FadeoutText.cc	(revision 5720)
@@ -0,0 +1,116 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "FadeoutText.h"
+
+#include <OgreTextAreaOverlayElement.h>
+#include "util/Math.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(FadeoutText);
+
+    FadeoutText::FadeoutText(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(FadeoutText);
+
+        this->delay_ = 3.0f;
+        this->fadeouttime_ = 1.0f;
+
+        this->bFadingOut_ = false;
+        this->fadeouttimer_.setTimer(3.0f, false, this, createExecutor(createFunctor(&FadeoutText::fadeout)));
+        this->fadeouttimer_.stopTimer();
+
+        this->initialAlpha_ = 1.0f;
+    }
+
+    void FadeoutText::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(FadeoutText, XMLPort, xmlelement, mode);
+
+        XMLPortParam(FadeoutText, "delay", setDelay, getDelay, xmlelement, mode);
+        XMLPortParam(FadeoutText, "fadeout", setFadeouttime, getFadeouttime, xmlelement, mode);
+    }
+
+    void FadeoutText::tick(float dt)
+    {
+        if (this->bFadingOut_)
+        {
+            ColourValue colour = this->getColour();
+
+            if (colour.a > 0)
+            {
+                float alpha = colour.a;
+
+                alpha -= dt / this->fadeouttime_;
+                if (alpha < 0)
+                    alpha = 0;
+                colour.a = alpha;
+
+                this->text_->setColour(colour);
+            }
+            else
+            {
+                this->text_->setCaption("");
+                this->reset();
+            }
+        }
+    }
+
+    void FadeoutText::fadeout()
+    {
+        this->bFadingOut_ = true;
+    }
+
+    void FadeoutText::reset()
+    {
+        this->bFadingOut_ = false;
+
+        ColourValue colour = this->getColour();
+        colour.a = this->initialAlpha_;
+        this->text_->setColour(colour);
+    }
+
+    void FadeoutText::changedColour()
+    {
+        OverlayText::changedColour();
+
+        this->initialAlpha_ = this->getColour().a;
+    }
+
+    void FadeoutText::changedCaption()
+    {
+        OverlayText::changedCaption();
+
+        this->reset();
+        this->fadeouttimer_.setInterval(this->delay_);
+        this->fadeouttimer_.startTimer();
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/FadeoutText.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/FadeoutText.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/FadeoutText.h	(revision 5720)
@@ -0,0 +1,75 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _FadeoutText_H__
+#define _FadeoutText_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/Timer.h"
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport FadeoutText : public OverlayText, public Tickable
+    {
+        public:
+            FadeoutText(BaseObject* creator);
+            virtual ~FadeoutText() {}
+
+            virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+            virtual void tick(float dt);
+
+            inline void setDelay(float delay)
+                { this->delay_ = delay; }
+            inline float getDelay() const
+                { return this->delay_; }
+
+            inline void setFadeouttime(float fadeouttime)
+                { this->fadeouttime_ = fadeouttime; }
+            inline float getFadeouttime() const
+                { return this->fadeouttime_; }
+
+        private:
+            virtual void changedColour();
+            virtual void changedCaption();
+
+            void fadeout();
+            void reset();
+
+            float delay_;
+            float fadeouttime_;
+
+            bool bFadingOut_;
+            Timer<FadeoutText> fadeouttimer_;
+
+            float initialAlpha_;
+    };
+}
+#endif /* _FadeoutText_H__ */
Index: code/branches/libraries2/src/modules/overlays/GUIOverlay.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/GUIOverlay.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/GUIOverlay.cc	(revision 5720)
@@ -0,0 +1,87 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "GUIOverlay.h"
+
+#include <string>
+#include <sstream>
+
+#include "core/input/InputManager.h"
+#include "core/CoreIncludes.h"
+#include "core/GUIManager.h"
+#include "core/XMLPort.h"
+#include "objects/infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateFactory(GUIOverlay);
+
+    GUIOverlay::GUIOverlay(BaseObject* creator) : OrxonoxOverlay(creator)
+    {
+        RegisterObject(GUIOverlay);
+    }
+
+    GUIOverlay::~GUIOverlay()
+    {
+    }
+
+    void GUIOverlay::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(GUIOverlay, XMLPort, xmlElement, mode);
+
+        XMLPortParam(GUIOverlay, "guiname", setGUIName, getGUIName, xmlElement, mode);
+    }
+
+    void GUIOverlay::changedVisibility()
+    {
+        SUPER(GUIOverlay, changedVisibility);
+
+        if (this->isVisible())
+        {
+            std::string str;
+            std::stringstream out;
+            out << reinterpret_cast<long>(this);
+            str = out.str();
+            GUIManager::getInstance().executeCode("showCursor()");
+            InputManager::getInstance().enterState("guiMouseOnly");
+            GUIManager::getInstance().executeCode("showGUI(\"" + this->guiName_ + "\", " + str + ")");
+        }
+        else
+        {
+            GUIManager::getInstance().executeCode("hideGUI(\"" + this->guiName_ + "\")");
+            GUIManager::getInstance().executeCode("hideCursor()");
+            InputManager::getInstance().leaveState("guiMouseOnly");
+        }
+    }
+
+    void GUIOverlay::setGUIName(const std::string& name)
+    {
+        this->guiName_ = name;
+        GUIManager::getInstance().setPlayer(name, orxonox_cast<PlayerInfo*>(this->getOwner()));
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/GUIOverlay.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/GUIOverlay.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/GUIOverlay.h	(revision 5720)
@@ -0,0 +1,58 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _GUIOverlay_H__
+#define _GUIOverlay_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <string>
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport GUIOverlay : public OrxonoxOverlay
+    {
+        public:
+
+            GUIOverlay(BaseObject* creator);
+            virtual ~GUIOverlay();
+
+            virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+
+            void setGUIName(const std::string& name);
+            inline const std::string& getGUIName() const { return this->guiName_; }
+
+            virtual void changedVisibility();
+
+        private:
+            std::string guiName_;
+    };
+}
+
+#endif
Index: code/branches/libraries2/src/modules/overlays/OverlayText.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/OverlayText.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/OverlayText.cc	(revision 5720)
@@ -0,0 +1,170 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OverlayText.h"
+
+#include <OgreOverlayManager.h>
+#include <OgrePanelOverlayElement.h>
+#include <OgreTextAreaOverlayElement.h>
+#include <boost/static_assert.hpp>
+
+#include "util/StringUtils.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+
+namespace orxonox
+{
+    CreateFactory(OverlayText);
+
+    BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Left   == (int)OverlayText::Left);
+    BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Center == (int)OverlayText::Center);
+    BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Right  == (int)OverlayText::Right);
+
+    OverlayText::OverlayText(BaseObject* creator)
+        : OrxonoxOverlay(creator)
+    {
+        RegisterObject(OverlayText);
+
+        this->text_ = static_cast<Ogre::TextAreaOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("TextArea", "OverlayText_text_" + getUniqueNumberString()));
+        this->text_->setCharHeight(1.0);
+
+        this->setFont("Monofur");
+        this->setColour(ColourValue(1.0, 1.0, 1.0, 1.0));
+        this->setCaption("");
+        this->setTextSize(1.0f);
+        this->setAlignmentString("left");
+
+        this->background_->addChild(this->text_);
+    }
+
+    OverlayText::~OverlayText()
+    {
+        if (this->isInitialized())
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->text_);
+    }
+
+    void OverlayText::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(OverlayText, XMLPort, xmlElement, mode);
+
+        XMLPortParam(OverlayText, "font",       setFont,            getFont,            xmlElement, mode);
+        XMLPortParam(OverlayText, "colour",     setColour,          getColour,          xmlElement, mode);
+        XMLPortParam(OverlayText, "caption",    setCaption,         getCaption,         xmlElement, mode);
+        XMLPortParam(OverlayText, "textsize",   setTextSize,        getTextSize,        xmlElement, mode);
+        XMLPortParam(OverlayText, "align",      setAlignmentString, getAlignmentString, xmlElement, mode);
+        XMLPortParam(OverlayText, "spacewidth", setSpaceWidth,      getSpaceWidth,      xmlElement, mode);
+    }
+
+    void OverlayText::setAlignmentString(const std::string& alignment)
+    {
+        if (alignment == "right")
+            this->setAlignment(OverlayText::Right);
+        else if (alignment == "center")
+            this->setAlignment(OverlayText::Center);
+        else // "left" and default
+            this->setAlignment(OverlayText::Left);
+    }
+
+    std::string OverlayText::getAlignmentString() const
+    {
+        Ogre::TextAreaOverlayElement::Alignment alignment = this->text_->getAlignment();
+
+        switch (alignment)
+        {
+            case Ogre::TextAreaOverlayElement::Right:
+                return "right";
+            case Ogre::TextAreaOverlayElement::Center:
+                return "center";
+            case Ogre::TextAreaOverlayElement::Left:
+                return "left";
+            default:
+                assert(false); return "";
+        }
+    }
+
+    void OverlayText::sizeChanged()
+    {
+        if (this->rotState_ == Horizontal)
+            this->overlay_->setScale(size_.y * sizeCorrection_.y, size_.y * sizeCorrection_.y);
+        else if (this->rotState_ == Vertical)
+            this->overlay_->setScale(size_.y / (sizeCorrection_.y * sizeCorrection_.y), size_.y * sizeCorrection_.y);
+        else
+            this->overlay_->setScale(size_.y, size_.y);
+
+        positionChanged();
+    }
+
+    void OverlayText::setCaption(const std::string& caption)
+    {
+        this->text_->setCaption(caption);
+        this->changedCaption();
+    }
+    std::string OverlayText::getCaption() const
+    {
+        return this->text_->getCaption();
+    }
+
+    void OverlayText::setFont(const std::string& font)
+    {
+        if (font != "")
+            this->text_->setFontName(font);
+    }
+    const std::string& OverlayText::getFont() const
+    {
+        return this->text_->getFontName();
+    }
+
+    void OverlayText::setSpaceWidth(float width)
+    {
+        this->text_->setSpaceWidth(width);
+    }
+    float OverlayText::getSpaceWidth() const
+    {
+        return this->text_->getSpaceWidth();
+    }
+
+    void OverlayText::setColour(const ColourValue& colour)
+    {
+        this->text_->setColour(colour); this->changedColour();
+    }
+    const ColourValue& OverlayText::getColour() const
+    {
+        return this->text_->getColour();
+    }
+
+    void OverlayText::setAlignment(OverlayText::Alignment alignment)
+    {
+        this->text_->setAlignment(static_cast<Ogre::TextAreaOverlayElement::Alignment>(alignment));
+    }
+    OverlayText::Alignment OverlayText::getAlignment() const
+    {
+        return static_cast<OverlayText::Alignment>(this->text_->getAlignment());
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/OverlayText.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/OverlayText.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/OverlayText.h	(revision 5720)
@@ -0,0 +1,85 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _OverlayText_H__
+#define _OverlayText_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <string>
+#include "util/Math.h"
+#include "util/OgreForwardRefs.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport OverlayText : public OrxonoxOverlay
+    {
+    public:
+        enum Alignment
+        {
+            Left,
+            Right,
+            Center
+        };
+
+        OverlayText(BaseObject* creator);
+        virtual ~OverlayText();
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+
+        void setCaption(const std::string& caption);
+        std::string getCaption() const;
+
+        void setFont(const std::string& font);
+        const std::string& getFont() const;
+
+        void setSpaceWidth(float width);
+        float getSpaceWidth() const;
+
+        void setColour(const ColourValue& colour);
+        const ColourValue& getColour() const;
+
+        void setAlignment(OverlayText::Alignment alignment);
+        OverlayText::Alignment getAlignment() const;
+
+        void setAlignmentString(const std::string& alignment);
+        std::string getAlignmentString() const;
+
+        inline void setTextSize(float size) { this->setSize(Vector2(size, size)); }
+        inline float getTextSize() const    { return this->getSize().y; }
+
+    protected:
+        virtual void sizeChanged();
+        virtual void changedColour() {}
+        virtual void changedCaption() {}
+
+        Ogre::TextAreaOverlayElement* text_;
+    };
+}
+#endif /* _OverlayText_H__ */
Index: code/branches/libraries2/src/modules/overlays/OverlaysPrereqs.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/OverlaysPrereqs.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/OverlaysPrereqs.h	(revision 5720)
@@ -0,0 +1,88 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+  @file
+  @brief Contains all the necessary forward declarations for all classes and structs.
+*/
+
+#ifndef _OverlaysPrereqs_H__
+#define _OverlaysPrereqs_H__
+
+#include "OrxonoxConfig.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_STATIC_BUILD)
+#  ifdef OVERLAYS_SHARED_BUILD
+#    define _OverlaysExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _OverlaysExport
+#    else
+#      define _OverlaysExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _OverlaysExport  __attribute__ ((visibility("default")))
+#else
+#  define _OverlaysExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class BarColour;
+    class DebugFPSText;
+    class DebugRTRText;
+    class GUIOverlay;
+    class HUDBar;
+    class HUDNavigation;
+    class HUDRadar;
+    class HUDSpeedBar;
+    class HUDHealthBar;
+    class HUDTimer;
+    class OrxonoxOverlay;
+    class OverlayGroup;
+    class OverlayText;
+    class FadeoutText;
+    class GametypeStatus;
+    class AnnounceMessage;
+    class KillMessage;
+    class DeathMessage;
+
+    class CreateLines;
+    class Scoreboard;
+    class Stats;
+}
+
+#endif /* _OverlaysPrereqs_H__ */
Index: code/branches/libraries2/src/modules/overlays/debug/CMakeLists.txt
===================================================================
--- code/branches/libraries2/src/modules/overlays/debug/CMakeLists.txt	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/debug/CMakeLists.txt	(revision 5720)
@@ -0,0 +1,4 @@
+ADD_SOURCE_FILES(OVERLAYS_SRC_FILES
+  DebugFPSText.cc
+  DebugRTRText.cc
+)
Index: code/branches/libraries2/src/modules/overlays/debug/DebugFPSText.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/debug/DebugFPSText.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/debug/DebugFPSText.cc	(revision 5720)
@@ -0,0 +1,55 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "DebugFPSText.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "core/Game.h"
+
+namespace orxonox
+{
+    CreateFactory(DebugFPSText);
+
+    DebugFPSText::DebugFPSText(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(DebugFPSText);
+    }
+
+    DebugFPSText::~DebugFPSText()
+    {
+    }
+
+    void DebugFPSText::tick(float dt)
+    {
+        SUPER(DebugFPSText, tick, dt);
+
+        float fps = Game::getInstance().getAvgFPS();
+        this->setCaption(multi_cast<std::string>(fps));
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/debug/DebugFPSText.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/debug/DebugFPSText.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/debug/DebugFPSText.h	(revision 5720)
@@ -0,0 +1,48 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _DebugFPSText_H__
+#define _DebugFPSText_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport DebugFPSText : public OverlayText, public Tickable
+    {
+    public:
+        DebugFPSText(BaseObject* creator);
+        virtual ~DebugFPSText();
+
+        virtual void tick(float dt);
+    };
+}
+#endif /* _DebugFPSText_H__ */
Index: code/branches/libraries2/src/modules/overlays/debug/DebugRTRText.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/debug/DebugRTRText.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/debug/DebugRTRText.cc	(revision 5720)
@@ -0,0 +1,55 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "DebugRTRText.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "core/Game.h"
+
+namespace orxonox
+{
+    CreateFactory(DebugRTRText);
+
+    DebugRTRText::DebugRTRText(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(DebugRTRText);
+    }
+
+    DebugRTRText::~DebugRTRText()
+    {
+    }
+
+    void DebugRTRText::tick(float dt)
+    {
+        SUPER(DebugRTRText, tick, dt);
+
+        float rtr = Game::getInstance().getAvgTickTime();
+        this->setCaption(multi_cast<std::string>(rtr));
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/debug/DebugRTRText.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/debug/DebugRTRText.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/debug/DebugRTRText.h	(revision 5720)
@@ -0,0 +1,48 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _DebugRTRText_H__
+#define _DebugRTRText_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport DebugRTRText : public OverlayText, public Tickable
+    {
+    public:
+        DebugRTRText(BaseObject* creator);
+        virtual ~DebugRTRText();
+
+        virtual void tick(float dt);
+    };
+}
+#endif /* _DebugRTRText_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/AnnounceMessage.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/AnnounceMessage.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/AnnounceMessage.cc	(revision 5720)
@@ -0,0 +1,60 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "AnnounceMessage.h"
+
+#include "core/CoreIncludes.h"
+#include "objects/infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateFactory(AnnounceMessage);
+
+    AnnounceMessage::AnnounceMessage(BaseObject* creator) : FadeoutText(creator)
+    {
+        RegisterObject(AnnounceMessage);
+
+        this->owner_ = 0;
+
+        this->setDelay(3.0f);
+        this->setFadeouttime(1.0f);
+    }
+
+    void AnnounceMessage::announcemessage(const GametypeInfo* gtinfo, const std::string& message)
+    {
+        if (this->owner_ && this->owner_->getGametypeInfo() == gtinfo)
+            this->setCaption(message);
+    }
+
+    void AnnounceMessage::changedOwner()
+    {
+        SUPER(AnnounceMessage, changedOwner);
+
+        this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner());
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/AnnounceMessage.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/AnnounceMessage.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/AnnounceMessage.h	(revision 5720)
@@ -0,0 +1,53 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _AnnounceMessage_H__
+#define _AnnounceMessage_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "interfaces/GametypeMessageListener.h"
+#include "overlays/FadeoutText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport AnnounceMessage : public FadeoutText, public GametypeMessageListener
+    {
+        public:
+            AnnounceMessage(BaseObject* creator);
+            virtual ~AnnounceMessage() {}
+
+            virtual void changedOwner();
+
+            void announcemessage(const GametypeInfo* gtinfo, const std::string& message);
+
+        private:
+            PlayerInfo* owner_;
+    };
+}
+#endif /* _AnnounceMessage_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/CMakeLists.txt
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/CMakeLists.txt	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/CMakeLists.txt	(revision 5720)
@@ -0,0 +1,16 @@
+ADD_SOURCE_FILES(OVERLAYS_SRC_FILES
+  HUDBar.cc
+  HUDNavigation.cc
+  HUDRadar.cc
+  HUDSpeedBar.cc
+  HUDHealthBar.cc
+  HUDTimer.cc
+  ChatOverlay.cc
+  GametypeStatus.cc
+  AnnounceMessage.cc
+  KillMessage.cc
+  DeathMessage.cc
+  PongScore.cc
+  UnderAttackHealthBar.cc
+  TeamBaseMatchScore.cc
+)
Index: code/branches/libraries2/src/modules/overlays/hud/ChatOverlay.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/ChatOverlay.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/ChatOverlay.cc	(revision 5720)
@@ -0,0 +1,110 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ChatOverlay.h"
+
+#include <string>
+#include <OgreTextAreaOverlayElement.h>
+
+#include "util/Convert.h"
+#include "util/UTFStringConversions.h"
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+#include "core/Executor.h"
+
+#include "tools/Timer.h"
+#include "objects/infos/PlayerInfo.h"
+#include "PlayerManager.h"
+
+namespace orxonox
+{
+    CreateFactory(ChatOverlay);
+
+    ChatOverlay::ChatOverlay(BaseObject* creator)
+        : OverlayText(creator)
+    {
+        RegisterObject(ChatOverlay);
+
+        this->displayTime_ = 0.0;
+
+        this->setConfigValues();
+    }
+
+    ChatOverlay::~ChatOverlay()
+    {
+    }
+
+    void ChatOverlay::setConfigValues()
+    {
+        SetConfigValue(displayTime_, 6.0f);
+    }
+
+    void ChatOverlay::incomingChat(const std::string& message, unsigned int senderID)
+    {
+        std::string text;
+
+        if (senderID != CLIENTID_UNKNOWN)
+        {
+            std::string name = "unknown";
+
+            PlayerInfo* player = PlayerManager::getInstance().getClient(senderID);
+            if (player)
+                name = player->getName();
+
+            text = name + ": " + message;
+        }
+        else
+        {
+            text = message;
+        }
+
+        this->messages_.push_back(multi_cast<Ogre::UTFString>(text));
+        COUT(0) << "Chat: " << text << std::endl;
+
+        new Timer<ChatOverlay>(this->displayTime_, false, this, createExecutor(createFunctor(&ChatOverlay::dropMessage)), true);
+
+        this->updateOverlayText();
+    }
+
+    void ChatOverlay::dropMessage()
+    {
+        if (this->messages_.size() > 0)
+            this->messages_.pop_front();
+        this->updateOverlayText();
+    }
+
+    void ChatOverlay::updateOverlayText()
+    {
+        this->text_->setCaption("");
+
+        for (std::list<Ogre::UTFString>::reverse_iterator it = this->messages_.rbegin(); it != this->messages_.rend(); ++it)
+        {
+            this->text_->setCaption(this->text_->getCaption() + "\n" + (*it));
+        }
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/ChatOverlay.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/ChatOverlay.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/ChatOverlay.h	(revision 5720)
@@ -0,0 +1,62 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ChatOverlay_H__
+#define _ChatOverlay_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <list>
+#include <OgreUTFString.h>
+
+#include "network/ChatListener.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport ChatOverlay : public OverlayText, public ChatListener
+    {
+        public:
+            ChatOverlay(BaseObject* creator);
+            virtual ~ChatOverlay();
+
+            void setConfigValues();
+
+        protected:
+            virtual void incomingChat(const std::string& message, unsigned int senderID);
+
+            std::list<Ogre::UTFString> messages_;
+
+        private:
+            void updateOverlayText();
+            void dropMessage();
+
+            float displayTime_;
+    };
+}
+#endif /* _DebugFPSText_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/DeathMessage.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/DeathMessage.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/DeathMessage.cc	(revision 5720)
@@ -0,0 +1,60 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "DeathMessage.h"
+
+#include "core/CoreIncludes.h"
+#include "objects/infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateFactory(DeathMessage);
+
+    DeathMessage::DeathMessage(BaseObject* creator) : FadeoutText(creator)
+    {
+        RegisterObject(DeathMessage);
+
+        this->owner_ = 0;
+
+        this->setDelay(2.0f);
+        this->setFadeouttime(0.5f);
+    }
+
+    void DeathMessage::deathmessage(const GametypeInfo* gtinfo, const std::string& message)
+    {
+        if (this->owner_ && this->owner_->getGametypeInfo() == gtinfo)
+            this->setCaption(message);
+    }
+
+    void DeathMessage::changedOwner()
+    {
+        SUPER(DeathMessage, changedOwner);
+
+        this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner());
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/DeathMessage.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/DeathMessage.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/DeathMessage.h	(revision 5720)
@@ -0,0 +1,53 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _DeathMessage_H__
+#define _DeathMessage_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "interfaces/GametypeMessageListener.h"
+#include "overlays/FadeoutText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport DeathMessage : public FadeoutText, public GametypeMessageListener
+    {
+        public:
+            DeathMessage(BaseObject* creator);
+            virtual ~DeathMessage() {}
+
+            virtual void changedOwner();
+
+            void deathmessage(const GametypeInfo* gtinfo, const std::string& message);
+
+        private:
+            PlayerInfo* owner_;
+    };
+}
+#endif /* _DeathMessage_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/GametypeStatus.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/GametypeStatus.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/GametypeStatus.cc	(revision 5720)
@@ -0,0 +1,90 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "GametypeStatus.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "objects/infos/GametypeInfo.h"
+#include "objects/infos/PlayerInfo.h"
+#include "objects/worldentities/ControllableEntity.h"
+#include "objects/worldentities/pawns/Spectator.h"
+
+namespace orxonox
+{
+    CreateFactory(GametypeStatus);
+
+    GametypeStatus::GametypeStatus(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(GametypeStatus);
+
+        this->owner_ = 0;
+    }
+
+    GametypeStatus::~GametypeStatus()
+    {
+    }
+
+    void GametypeStatus::tick(float dt)
+    {
+        SUPER(GametypeStatus, tick, dt);
+
+        if (this->owner_ && this->owner_->getGametypeInfo() && this->owner_->getControllableEntity())
+        {
+            const GametypeInfo* gtinfo = this->owner_->getGametypeInfo();
+            ControllableEntity* ce = this->owner_->getControllableEntity();
+
+            if (!gtinfo->hasStarted() && !gtinfo->isStartCountdownRunning())
+            {
+                if (!this->owner_->isReadyToSpawn())
+                    this->setCaption("Press [Fire] to start the match");
+                else
+                    this->setCaption("Waiting for other players");
+            }
+            else if (!gtinfo->hasEnded())
+            {
+                if (gtinfo->isStartCountdownRunning())
+                    this->setCaption(multi_cast<std::string>(static_cast<int>(ceil(gtinfo->getStartCountdown()))));
+                else if (ce->isA(Class(Spectator)))
+                    this->setCaption("Press [Fire] to respawn");
+                else
+                    this->setCaption("");
+            }
+            else
+                this->setCaption("Game has ended");
+        }
+    }
+
+
+    void GametypeStatus::changedOwner()
+    {
+        SUPER(GametypeStatus, changedOwner);
+
+        this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner());
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/GametypeStatus.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/GametypeStatus.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/GametypeStatus.h	(revision 5720)
@@ -0,0 +1,52 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _GametypeStatus_H__
+#define _GametypeStatus_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport GametypeStatus : public OverlayText, public Tickable
+    {
+        public:
+            GametypeStatus(BaseObject* creator);
+            virtual ~GametypeStatus();
+
+            virtual void tick(float dt);
+            virtual void changedOwner();
+
+        private:
+            PlayerInfo* owner_;
+    };
+}
+#endif /* _GametypeStatus_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/HUDBar.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/HUDBar.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/HUDBar.cc	(revision 5720)
@@ -0,0 +1,202 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Felix Schulthess
+ *      Fabian 'x3n' Landau
+ *      Reto Grieder
+ *
+ */
+
+#include "HUDBar.h"
+
+#include <OgreOverlayManager.h>
+#include <OgreMaterialManager.h>
+#include <OgreTechnique.h>
+#include <OgrePass.h>
+#include <OgrePanelOverlayElement.h>
+
+#include "util/Convert.h"
+#include "util/StringUtils.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(BarColour);
+
+    BarColour::BarColour(BaseObject* creator)
+        : BaseObject(creator)
+    {
+        RegisterObject(BarColour);
+
+        this->setColour(ColourValue(1.0, 1.0, 1.0, 1.0));
+        this->setPosition(0.0);
+    }
+
+    void BarColour::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(BarColour, XMLPort, xmlElement, mode);
+
+        XMLPortParam(BarColour, "colour", setColour, getColour, xmlElement, mode);
+        XMLPortParam(BarColour, "position", setPosition, getPosition, xmlElement, mode);
+    }
+
+
+    unsigned int HUDBar::materialcount_s = 0;
+
+    HUDBar::HUDBar(BaseObject* creator)
+        : OrxonoxOverlay(creator)
+    {
+        RegisterObject(HUDBar);
+
+        // create new material
+        std::string materialname = "barmaterial" + multi_cast<std::string>(materialcount_s++);
+        Ogre::MaterialPtr material = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().create(materialname, "General"));
+        material->getTechnique(0)->getPass(0)->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
+        this->textureUnitState_ = material->getTechnique(0)->getPass(0)->createTextureUnitState();
+        this->textureUnitState_->setTextureName("bar2.tga");
+        // use the default colour
+        this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, ColourValue(0.2f, 0.7f, 0.2f));
+
+        this->bar_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("Panel", "HUDBar_bar_" + getUniqueNumberString()));
+        this->bar_->setMaterialName(materialname);
+
+        this->value_ = 1.0f;  // initielize with 1.0f to trigger a change when calling setValue(0.0f) on the line below
+        this->setValue(0.0f); // <--
+        this->setRightToLeft(false);
+        this->setAutoColour(true);
+        this->currentColour_ = ColourValue::White;
+
+        this->background_->addChild(bar_);
+    }
+
+    HUDBar::~HUDBar()
+    {
+        if (this->isInitialized())
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->bar_);
+    }
+
+    void HUDBar::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(HUDBar, XMLPort, xmlElement, mode);
+
+        XMLPortParam(HUDBar, "initialvalue", setValue,       getValue,       xmlElement, mode);
+        XMLPortParam(HUDBar, "righttoleft",  setRightToLeft, getRightToLeft, xmlElement, mode);
+        XMLPortParam(HUDBar, "autocolour",   setAutoColour,  getAutoColour,  xmlElement, mode);
+        XMLPortParam(HUDBar, "bartexture",   setBarTexture,  getBarTexture, xmlElement, mode);
+        XMLPortObject(HUDBar, BarColour, "", addColour, getColour, xmlElement, mode);
+    }
+
+    void HUDBar::valueChanged()
+    {
+        if (this->autoColour_ && this->textureUnitState_)
+        {
+            // set colour
+            if (this->colours_.size() > 0)
+            {
+                ColourValue colour1(0, 0, 0, 1);
+                ColourValue colour2 = (*this->colours_.rbegin()).second;
+                float value1(0);
+                float value2 = (*this->colours_.rbegin()).first;
+                for (std::map<float, ColourValue>::reverse_iterator it = this->colours_.rbegin(); it != this->colours_.rend(); ++it)
+                {
+                    colour1 = colour2;
+                    value1 = value2;
+                    colour2 = (*it).second;
+                    value2 = (*it).first;
+
+                    if (value2 < this->value_)
+                        break;
+                }
+
+                if (value2 > this->value_)
+                {
+                    this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, colour2);
+                    this->currentColour_ = colour2;
+                }
+                else if (value1 < this->value_)
+                {
+                    this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, colour1);
+                    this->currentColour_ = colour1;
+                }
+                else
+                {
+                    //float interpolationfactor = (this->value_ - value2) / (value1 - value2);
+                    float interpolationfactor = interpolateSmooth((this->value_ - value2) / (value1 - value2), 0.0f, 1.0f);
+                    this->currentColour_ = colour1 * interpolationfactor + colour2 * (1 - interpolationfactor);
+                    this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, this->currentColour_);
+
+                }
+            }
+        }
+
+        // set value
+        if (this->right2Left_)
+        {
+            // backward casew
+            this->bar_->setPosition(0.06f + 0.88f * (1 - this->value_), 0.0f);
+            this->bar_->setDimensions(0.88f * this->value_, 1.0f);
+        }
+        else
+        {
+            // default case
+            this->bar_->setPosition(0.06f, 0.0f);
+            this->bar_->setDimensions(0.88f * this->value_, 1.0f);
+        }
+        if (this->value_ != 0)
+            this->bar_->setTiling(this->value_, 1.0);
+    }
+
+    void HUDBar::addColour(BarColour* colour)
+    {
+        float value = clamp<float>(colour->getPosition(), 0.0, 1.0);
+        this->colours_[value] = colour->getColour();
+
+        this->barColours_.push_back(colour);
+    }
+
+    BarColour* HUDBar::getColour(unsigned int index)
+    {
+        if (index < this->barColours_.size())
+            return barColours_[index];
+        else
+            return 0;
+    }
+
+    void HUDBar::clearColours()
+    {
+        this->colours_.clear();
+    }
+
+    void HUDBar::setBarTexture(const std::string& texture)
+    {
+        this->textureUnitState_->setTextureName(texture);
+    }
+
+    const std::string& HUDBar::getBarTexture() const
+    {
+        return this->textureUnitState_->getTextureName();
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/HUDBar.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/HUDBar.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/HUDBar.h	(revision 5720)
@@ -0,0 +1,139 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Felix Schulthess
+ *      Fabian 'x3n' Landau
+ *      Reto Grieder
+ *
+ */
+
+#ifndef _HUDBar_H__
+#define _HUDBar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <vector>
+
+#include "util/Math.h"
+#include "util/OgreForwardRefs.h"
+#include "core/BaseObject.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport BarColour : public BaseObject
+    {
+    public:
+        BarColour(BaseObject* creator);
+        virtual ~BarColour() { }
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+
+        void setColour(const ColourValue& colour) { this->colour_ = colour; }
+        const ColourValue& getColour() const { return this->colour_; }
+
+        void setPosition(float pos) { this->position_ = pos; }
+        float getPosition() const    { return this->position_; }
+
+    private:
+        ColourValue colour_;
+        float position_;
+    };
+
+
+    class _OverlaysExport HUDBar : public OrxonoxOverlay
+    {
+    public:
+        HUDBar(BaseObject* creator);
+        virtual ~HUDBar();
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+
+        void clearColours();
+
+        inline void setRightToLeft(bool r2l)
+        {
+            if (r2l != this->right2Left_)
+            {
+                this->right2Left_ = r2l;
+                this->valueChanged();
+            }
+        }
+        inline bool getRightToLeft() const
+            { return this->right2Left_; }
+
+        inline void setValue(float value)
+        {
+            float temp = clamp(value, 0.0f, 1.0f);
+            if (temp != this->value_)
+            {
+                this->value_ = temp;
+                this->valueChanged();
+            }
+        }
+        inline float getValue() const
+            { return this->value_; }
+
+        inline void setAutoColour(bool val)
+        {
+            if (val != this->autoColour_)
+            {
+                this->autoColour_ = val;
+                this->valueChanged();
+
+                if (!val)
+                    this->currentColour_ = ColourValue::White;
+            }
+        }
+        inline bool getAutoColour() const
+            { return this->autoColour_; }
+
+        void setBarTexture(const std::string& texture);
+        const std::string& getBarTexture() const;
+
+        inline const ColourValue& getCurrentBarColour() const
+            { return this->currentColour_; }
+
+    protected:
+        virtual void valueChanged();
+
+    private:
+        void addColour(BarColour* colour);
+        BarColour* getColour(unsigned int index);
+
+        bool right2Left_;
+        bool autoColour_;                   //!< whether bar changes colour automatically
+        float value_;                       //!< progress of bar
+        ColourValue currentColour_;
+
+        Ogre::PanelOverlayElement* bar_;
+        Ogre::TextureUnitState* textureUnitState_;
+        std::map<float, ColourValue> colours_;
+        std::vector<BarColour*> barColours_;
+
+        static unsigned int materialcount_s;
+    };
+}
+#endif /* _HUDBar_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/HUDHealthBar.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/HUDHealthBar.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/HUDHealthBar.cc	(revision 5720)
@@ -0,0 +1,133 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "HUDHealthBar.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "objects/worldentities/pawns/Pawn.h"
+#include "overlays/OverlayGroup.h"
+
+namespace orxonox
+{
+    CreateFactory(HUDHealthBar);
+
+    HUDHealthBar::HUDHealthBar(BaseObject* creator) : HUDBar(creator)
+    {
+        RegisterObject(HUDHealthBar);
+
+        this->owner_ = 0;
+        this->bUseBarColour_ = false;
+
+        this->textoverlay_ = new OverlayText(this);
+
+        assert(this->textoverlay_);
+
+        this->textoverlay_->setCaption("");
+    }
+
+    HUDHealthBar::~HUDHealthBar()
+    {
+        if (this->isInitialized())
+            delete this->textoverlay_;
+    }
+
+    void HUDHealthBar::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(HUDHealthBar, XMLPort, xmlelement, mode);
+
+        XMLPortParam(HUDHealthBar, "showtext",          setTextVisible,          getTextVisible,          xmlelement, mode).defaultValues(true);
+        XMLPortParam(HUDHealthBar, "textfont",          setTextFont,             getTextFont,             xmlelement, mode).defaultValues("Monofur");
+        XMLPortParam(HUDHealthBar, "textusebarcolour",  setTextUseBarColour,     getTextUseBarColour,     xmlelement, mode).defaultValues(false);
+        XMLPortParam(HUDHealthBar, "textcolour",        setTextColour,           getTextColour,           xmlelement, mode).defaultValues(ColourValue(1.0, 1.0, 1.0, 1.0));
+        XMLPortParam(HUDHealthBar, "textsize",          setTextSize,             getTextSize,             xmlelement, mode).defaultValues(1.0f);
+        XMLPortParam(HUDHealthBar, "textalign",         setTextAlignmentString,  getTextAlignmentString,  xmlelement, mode).defaultValues("left");
+        XMLPortParam(HUDHealthBar, "textoffset",        setTextOffset,           getTextOffset,           xmlelement, mode).defaultValues(Vector2::ZERO);
+        XMLPortParam(HUDHealthBar, "textpickpoint",     setTextPickPoint,        getTextPickPoint,        xmlelement, mode).defaultValues(Vector2::ZERO);
+        XMLPortParam(HUDHealthBar, "textrotation",      setTextRotation,         getTextRotation,         xmlelement, mode).defaultValues(0.0f);
+        XMLPortParam(HUDHealthBar, "textcorrectaspect", setTextAspectCorrection, getTextAspectCorrection, xmlelement, mode).defaultValues(true);
+        XMLPortParam(HUDHealthBar, "textspacewidth",    setTextSpaceWidth,       getTextSpaceWidth,       xmlelement, mode).defaultValues(true);
+    }
+
+    void HUDHealthBar::tick(float dt)
+    {
+        SUPER(HUDHealthBar, tick, dt);
+
+        if (this->owner_)
+        {
+            this->setValue(this->owner_->getHealth() / this->owner_->getInitialHealth());
+            this->textoverlay_->setCaption(multi_cast<std::string>(static_cast<int>(this->owner_->getHealth())));
+        }
+
+        if (this->bUseBarColour_)
+            this->textoverlay_->setColour(this->getCurrentBarColour());
+    }
+
+    void HUDHealthBar::changedOwner()
+    {
+        SUPER(HUDHealthBar, changedOwner);
+
+        this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
+    }
+
+    void HUDHealthBar::changedOverlayGroup()
+    {
+        SUPER(HUDHealthBar, changedOverlayGroup);
+
+        this->getOverlayGroup()->addElement(this->textoverlay_);
+    }
+
+    void HUDHealthBar::changedVisibility()
+    {
+        SUPER(HUDHealthBar, changedVisibility);
+
+        this->textoverlay_->setVisible(this->isVisible());
+    }
+
+    void HUDHealthBar::changedName()
+    {
+        SUPER(HUDHealthBar, changedName);
+
+        this->textoverlay_->setName(this->getName() + "text");
+    }
+
+    void HUDHealthBar::setTextColour(const ColourValue& colour)
+    {
+        this->textColour_ = colour;
+        if (!this->bUseBarColour_)
+            this->textoverlay_->setColour(colour);
+    }
+
+    void HUDHealthBar::setTextUseBarColour(bool bUseBarColour)
+    {
+        this->bUseBarColour_ = bUseBarColour;
+        if (!bUseBarColour)
+            this->textoverlay_->setColour(this->textColour_);
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/HUDHealthBar.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/HUDHealthBar.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/HUDHealthBar.h	(revision 5720)
@@ -0,0 +1,119 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _HUDHealthBar_H__
+#define _HUDHealthBar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "util/Math.h"
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+#include "HUDBar.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDHealthBar : public HUDBar, public Tickable
+    {
+        public:
+            HUDHealthBar(BaseObject* creator);
+            virtual ~HUDHealthBar();
+
+            virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+            virtual void tick(float dt);
+            virtual void changedOwner();
+            virtual void changedOverlayGroup();
+            virtual void changedVisibility();
+            virtual void changedName();
+
+            inline void setTextFont(const std::string& font)
+                { if (font != "") { this->textoverlay_->setFont(font); } }
+            inline const std::string& getTextFont() const
+                { return this->textoverlay_->getFont(); }
+
+            void setTextColour(const ColourValue& colour);
+            inline const ColourValue& getTextColour() const
+                { return this->textoverlay_->getColour(); }
+
+            void setTextUseBarColour(bool bUseBarColour);
+            inline bool getTextUseBarColour() const
+                { return this->bUseBarColour_; }
+
+            inline void setTextAlignment(OverlayText::Alignment alignment)
+                { this->textoverlay_->setAlignment(alignment); }
+            inline OverlayText::Alignment getTextAlignment() const
+                { return this->textoverlay_->getAlignment(); }
+
+            void setTextAlignmentString(const std::string& alignment)
+                { this->textoverlay_->setAlignmentString(alignment); }
+            std::string getTextAlignmentString() const
+                { return this->textoverlay_->getAlignmentString(); }
+
+            inline void setTextSize(float size)
+                { this->textoverlay_->setTextSize(size); }
+            inline float getTextSize() const
+                { return this->textoverlay_->getTextSize(); }
+
+            inline void setTextVisible(bool bVisible)
+                { this->textoverlay_->setVisible(bVisible); }
+            inline bool getTextVisible() const
+                { return this->textoverlay_->isVisible(); }
+
+            inline void setTextPickPoint(const Vector2& pickpoint)
+                { this->textoverlay_->setPickPoint(pickpoint); }
+            inline Vector2 getTextPickPoint() const
+                { return this->textoverlay_->getPickPoint(); }
+
+            inline void setTextOffset(const Vector2& position)
+                { this->textoverlay_->setPosition(this->getPosition() + (position - this->getPickPoint()) * this->getSize()); }
+            inline Vector2 getTextOffset() const
+                { return (this->textoverlay_->getPosition() - this->getPosition()) / this->getSize() + this->getPickPoint(); }
+
+            inline void setTextAspectCorrection(bool correct)
+                { this->textoverlay_->setAspectCorrection(correct); }
+            inline bool getTextAspectCorrection() const
+                { return this->textoverlay_->getAspectCorrection(); }
+
+            inline void setTextRotation(const Degree& angle)
+                { this->textoverlay_->setRotation(angle); }
+            inline const Degree& getTextRotation() const
+                { return this->textoverlay_->getRotation(); }
+
+            inline void setTextSpaceWidth(float width)
+                { this->textoverlay_->setSpaceWidth(width); }
+            inline float getTextSpaceWidth() const
+                { return this->textoverlay_->getSpaceWidth(); }
+
+        private:
+            Pawn* owner_;
+            OverlayText* textoverlay_;
+            bool bUseBarColour_;
+            ColourValue textColour_;
+    };
+}
+#endif /* _HUDHealthBar_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/HUDNavigation.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/HUDNavigation.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/HUDNavigation.cc	(revision 5720)
@@ -0,0 +1,275 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Felix Schulthess
+ *   Co-authors:
+ *      Reto Grieder
+ *
+ */
+
+#include "HUDNavigation.h"
+
+#include <string>
+#include <OgreOverlayManager.h>
+#include <OgreTextAreaOverlayElement.h>
+#include <OgrePanelOverlayElement.h>
+
+#include "util/Math.h"
+#include "util/StringUtils.h"
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "objects/Radar.h"
+
+namespace orxonox
+{
+    CreateFactory(HUDNavigation);
+
+    HUDNavigation::HUDNavigation(BaseObject* creator)
+        : OrxonoxOverlay(creator)
+    {
+        RegisterObject(HUDNavigation);
+
+        // create nav text
+        navText_ = static_cast<Ogre::TextAreaOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("TextArea", "HUDNavigation_navText_" + getUniqueNumberString()));
+
+        // create nav marker
+        navMarker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("Panel", "HUDNavigation_navMarker_" + getUniqueNumberString()));
+        navMarker_->setMaterialName("Orxonox/NavArrows");
+
+        // create aim marker
+        aimMarker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("Panel", "HUDNavigation_aimMarker_" + getUniqueNumberString()));
+        aimMarker_->setMaterialName("Orxonox/NavCrosshair");
+        this->wasOutOfView_ = true; // Ensure the material is changed right the first time..
+
+        setFont("Monofur");
+        setTextSize(0.05f);
+        setNavMarkerSize(0.05f);
+        setAimMarkerSize(0.04f);
+
+        background_->addChild(navMarker_);
+        background_->addChild(aimMarker_);
+        background_->addChild(navText_);
+
+        // hide at first
+        this->setVisible(false);
+    }
+
+    HUDNavigation::~HUDNavigation()
+    {
+        if (this->isInitialized())
+        {
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->navMarker_);
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->navText_);
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->aimMarker_);
+        }
+    }
+
+    void HUDNavigation::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(HUDNavigation, XMLPort, xmlElement, mode);
+
+        XMLPortParam(HUDNavigation, "font",     setFont,     getFont,     xmlElement, mode);
+        XMLPortParam(HUDNavigation, "textSize", setTextSize, getTextSize, xmlElement, mode);
+        XMLPortParam(HUDNavigation, "navMarkerSize", setNavMarkerSize, getNavMarkerSize, xmlElement, mode);
+        XMLPortParam(HUDNavigation, "aimMarkerSize", setAimMarkerSize, getAimMarkerSize, xmlElement, mode);
+    }
+
+    void HUDNavigation::setFont(const std::string& font)
+    {
+        if (this->navText_ && font != "")
+            this->navText_->setFontName(font);
+    }
+
+    const std::string& HUDNavigation::getFont() const
+    {
+        if (this->navText_)
+            return this->navText_->getFontName();
+        else
+            return BLANKSTRING;
+    }
+
+    void HUDNavigation::setTextSize(float size)
+    {
+        if (this->navText_ && size >= 0.0f)
+            this->navText_->setCharHeight(size);
+    }
+
+    float HUDNavigation::getTextSize() const
+    {
+        if (this->navText_)
+            return this->navText_->getCharHeight();
+        else
+            return 0.0f;
+    }
+
+    void HUDNavigation::tick(float dt)
+    {
+        SUPER(HUDNavigation, tick, dt);
+
+        if (!Radar::getInstance().getFocus())
+        {
+            this->overlay_->hide();
+            return;
+        }
+        else
+        {
+            this->overlay_->show();
+        }
+
+        // set text
+        int dist = static_cast<int>(getDist2Focus());
+        navText_->setCaption(multi_cast<std::string>(dist));
+        float textLength = multi_cast<std::string>(dist).size() * navText_->getCharHeight() * 0.3;
+
+/*
+        Ogre::Camera* navCam = SpaceShip::getLocalShip()->getCamera()->cam_;
+        Matrix4 transformationMatrix = navCam->getProjectionMatrix() * navCam->getViewMatrix();
+*/
+        // transform to screen coordinates
+        Vector3 pos = /*transformationMatrix * */Radar::getInstance().getFocus()->getRVWorldPosition();
+
+        bool outOfView;
+        if (pos.z > 1.0)
+        {
+            // z > 1.0 means that the object is behind the camera
+            outOfView = true;
+            // we have to switch all coordinates (if you don't know why,
+            // try linear algebra lectures, because I can't explain..)
+            pos.x = -pos.x;
+            pos.y = -pos.y;
+        }
+        else
+            outOfView = pos.x < -1.0 || pos.x > 1.0 || pos.y < -1.0 || pos.y > 1.0;
+
+        if (outOfView)
+        {
+            // object is not in view
+            aimMarker_->hide();
+
+            if (!wasOutOfView_)
+            {
+                navMarker_->setMaterialName("Orxonox/NavArrows");
+                wasOutOfView_ = true;
+            }
+
+            if (pos.x < pos.y)
+            {
+                if (pos.y > -pos.x)
+                {
+                    // up
+                    float position = pos.x / pos.y + 1.0;
+                    navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5, 0.0);
+                    navMarker_->setUV(0.5, 0.0, 1.0, 0.5);
+                    navText_->setLeft((position - textLength) * 0.5);
+                    navText_->setTop(navMarker_->getHeight());
+                }
+                else
+                {
+                    // left
+                    float position = pos.y / pos.x + 1.0;
+                    navMarker_->setPosition(0.0, (position - navMarker_->getWidth()) * 0.5);
+                    navMarker_->setUV(0.0, 0.0, 0.5, 0.5);
+                    navText_->setLeft(navMarker_->getWidth() + 0.01);
+                    navText_->setTop((position - navText_->getCharHeight()) * 0.5);
+                }
+            }
+            else
+            {
+                if (pos.y < -pos.x)
+                {
+                    // down
+                    float position = -pos.x / pos.y + 1.0;
+                    navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5, 1.0 - navMarker_->getHeight());
+                    navMarker_->setUV(0.0, 0.5, 0.5, 1.0);
+                    navText_->setLeft((position - textLength) * 0.5);
+                    navText_->setTop(1.0 - navMarker_->getHeight() - navText_->getCharHeight());
+                }
+                else
+                {
+                    // right
+                    float position = -pos.y / pos.x + 1.0;
+                    navMarker_->setPosition(1.0 - navMarker_->getWidth(), (position - navMarker_->getHeight()) * 0.5);
+                    navMarker_->setUV(0.5, 0.5, 1.0, 1.0);
+                    navText_->setLeft(1.0 - navMarker_->getWidth() - textLength - 0.01);
+                    navText_->setTop((position - navText_->getCharHeight()) * 0.5);
+                }
+            }
+        }
+        else
+        {
+            // object is in view
+/*
+            Vector3 aimpos = transformationMatrix * getPredictedPosition(SpaceShip::getLocalShip()->getPosition(),
+                    Projectile::getSpeed(), Radar::getInstance().getFocus()->getRVWorldPosition(), Radar::getInstance().getFocus()->getRVOrientedVelocity());
+*/
+            if (wasOutOfView_)
+            {
+                navMarker_->setMaterialName("Orxonox/NavTDC");
+                wasOutOfView_ = false;
+            }
+
+            // object is in view
+            navMarker_->setUV(0.0, 0.0, 1.0, 1.0);
+            navMarker_->setLeft((pos.x + 1.0 - navMarker_->getWidth()) * 0.5);
+            navMarker_->setTop((-pos.y + 1.0 - navMarker_->getHeight()) * 0.5);
+
+            aimMarker_->show();
+/*
+            aimMarker_->setLeft((aimpos.x + 1.0 - aimMarker_->getWidth()) * 0.5);
+            aimMarker_->setTop((-aimpos.y + 1.0 - aimMarker_->getHeight()) * 0.5);
+*/
+            navText_->setLeft((pos.x + 1.0 + navMarker_->getWidth()) * 0.5);
+            navText_->setTop((-pos.y + 1.0 + navMarker_->getHeight()) * 0.5);
+        }
+    }
+
+    float HUDNavigation::getDist2Focus() const
+    {
+/*
+        if (Radar::getInstance().getFocus())
+            return (Radar::getInstance().getFocus()->getRVWorldPosition() - SpaceShip::getLocalShip()->getPosition()).length();
+        else
+*/
+            return 0;
+    }
+
+    /**
+    @brief Overridden method of OrxonoxOverlay. Usually the entire overlay
+           scales with scale(). Here we obviously have to adjust this.
+    */
+    void HUDNavigation::sizeChanged()
+    {
+        // use size to compensate for apspect ratio if enabled.
+        float xScale = this->getActualSize().x;
+        float yScale = this->getActualSize().y;
+        if (this->navMarker_)
+            navMarker_->setDimensions(navMarkerSize_ * xScale, navMarkerSize_ * yScale);
+        if (this->aimMarker_)
+            aimMarker_->setDimensions(aimMarkerSize_ * xScale, aimMarkerSize_ * yScale);
+        if (this->navText_)
+            navText_->setCharHeight(navText_->getCharHeight() * yScale);
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/HUDNavigation.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/HUDNavigation.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/HUDNavigation.h	(revision 5720)
@@ -0,0 +1,80 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Felix Schulthess
+ *   Co-authors:
+ *      Reto Grieder
+ *
+ */
+
+#ifndef _HUDNavigation_H__
+#define _HUDNavigation_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "util/OgreForwardRefs.h"
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDNavigation : public OrxonoxOverlay, public Tickable
+    {
+    public:
+        HUDNavigation(BaseObject* creator);
+        virtual ~HUDNavigation();
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+        virtual void tick(float dt);
+
+    private:
+        void sizeChanged();
+        void angleChanged() { }
+        void positionChanged() { }
+
+        // XMLPort accessors
+        void setNavMarkerSize(float size) { this->navMarkerSize_ = size; this->sizeChanged(); }
+        float getNavMarkerSize() const    { return this->navMarkerSize_; }
+
+        void setAimMarkerSize(float size) { this->aimMarkerSize_ = size; this->sizeChanged(); }
+        float getAimMarkerSize() const    { return this->aimMarkerSize_; }
+
+        void setTextSize(float size);
+        float getTextSize() const;
+
+        void setFont(const std::string& font);
+        const std::string& getFont() const;
+
+        void updateMarker();
+        void updateFocus();
+        float getDist2Focus() const;
+
+        Ogre::PanelOverlayElement* navMarker_;      //!< the panel used to show the arrow and the target marker
+        float navMarkerSize_;                       //!< One paramter size of the navigation marker
+        Ogre::PanelOverlayElement* aimMarker_;      //!< Panel used to show the aim Marker
+        float aimMarkerSize_;                       //!< One paramter size of the aim marker
+        Ogre::TextAreaOverlayElement* navText_;     //!< Text overlay to display the target distance
+        bool wasOutOfView_;                         //!< Performance booster variable: setMaterial is not cheap
+    };
+}
+
+#endif /* _HUDNavigation_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/HUDRadar.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/HUDRadar.cc	(revision 5720)
@@ -0,0 +1,168 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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
+ *      Felix Schulthess
+ *   Co-authors:
+ *      Reto Grieder
+ *
+ */
+
+#include "HUDRadar.h"
+
+#include <OgreOverlayManager.h>
+#include <OgrePanelOverlayElement.h>
+
+#include "util/Math.h"
+#include "util/StringUtils.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "tools/TextureGenerator.h"
+#include "objects/worldentities/WorldEntity.h"
+#include "objects/worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+    CreateFactory(HUDRadar);
+
+    HUDRadar::HUDRadar(BaseObject* creator)
+        : OrxonoxOverlay(creator)
+    {
+        RegisterObject(HUDRadar);
+
+        this->marker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("Panel", "HUDRadar_marker_" + getUniqueNumberString()));
+        this->marker_->setMaterialName("Orxonox/RadarMarker");
+        this->overlay_->add2D(this->marker_);
+        this->marker_->hide();
+
+        this->setRadarSensitivity(1.0f);
+        this->setHalfDotSizeDistance(3000.0f);
+        this->setMaximumDotSize(0.1f);
+
+        this->shapeMaterials_[RadarViewable::Dot]      = "RadarDot.tga";
+        this->shapeMaterials_[RadarViewable::Triangle] = "RadarTriangle.tga";
+        this->shapeMaterials_[RadarViewable::Square]   = "RadarSquare.tga";
+
+        this->owner_ = 0;
+    }
+
+    HUDRadar::~HUDRadar()
+    {
+        if (this->isInitialized())
+        {
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->marker_);
+            for (std::vector<Ogre::PanelOverlayElement*>::iterator it = this->radarDots_.begin();
+                it != this->radarDots_.end(); ++it)
+            {
+                Ogre::OverlayManager::getSingleton().destroyOverlayElement(*it);
+            }
+        }
+    }
+
+    void HUDRadar::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(HUDRadar, XMLPort, xmlElement, mode);
+
+        XMLPortParam(HUDRadar, "sensitivity", setRadarSensitivity, getRadarSensitivity, xmlElement, mode);
+        XMLPortParam(HUDRadar, "halfDotSizeDistance", setHalfDotSizeDistance, getHalfDotSizeDistance, xmlElement, mode);
+        XMLPortParam(HUDRadar, "maximumDotSize", setMaximumDotSize, getMaximumDotSize, xmlElement, mode);
+    }
+
+    void HUDRadar::displayObject(RadarViewable* object, bool bIsMarked)
+    {
+        if (object == static_cast<RadarViewable*>(this->owner_))
+            return;
+
+        const WorldEntity* wePointer = object->getWorldEntity();
+
+        // Just to be sure that we actually have a WorldEntity.
+        // We could do a dynamic_cast, but that would be a lot slower.
+        if (!wePointer || !this->owner_)
+        {
+            if (!wePointer)
+                CCOUT(2) << "Cannot display a non-WorldEntitiy on the radar" << std::endl;
+            if (!this->owner_)
+                CCOUT(2) << "No owner defined" << std::endl;
+            return;
+        }
+
+        // try to find a panel already created
+        Ogre::PanelOverlayElement* panel;
+        //std::map<RadarViewable*, Ogre::PanelOverlayElement*>::iterator it = this->radarDots_.find(object);
+        if (itRadarDots_ == this->radarDots_.end())
+        {
+            // we have to create a new entry
+            panel = static_cast<Ogre::PanelOverlayElement*>(
+                Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "RadarDot" + getUniqueNumberString()));
+            radarDots_.push_back(panel);
+            // get right material
+            panel->setMaterialName(TextureGenerator::getMaterialName(
+                shapeMaterials_[object->getRadarObjectShape()], object->getRadarObjectColour()));
+            this->overlay_->add2D(panel);
+            this->itRadarDots_ = this->radarDots_.end();
+        }
+        else
+        {
+            panel = *itRadarDots_;
+            ++itRadarDots_;
+            std::string materialName = TextureGenerator::getMaterialName(
+                shapeMaterials_[object->getRadarObjectShape()], object->getRadarObjectColour());
+            if (materialName != panel->getMaterialName())
+                panel->setMaterialName(materialName);
+        }
+        panel->show();
+
+        // set size to fit distance...
+        float distance = (wePointer->getWorldPosition() - this->owner_->getPosition()).length();
+        // calculate the size with 1/distance dependency for simplicity (instead of exp(-distance * lambda)
+        float size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance);
+        panel->setDimensions(size, size);
+
+        // calc position on radar...
+        Vector2 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
+        coord *= Ogre::Math::PI / 3.5; // small adjustment to make it fit the texture
+        panel->setPosition((1.0 + coord.x - size) * 0.5, (1.0 - coord.y - size) * 0.5);
+
+        if (bIsMarked)
+        {
+            this->marker_->show();
+            this->marker_->setDimensions(size * 1.5, size * 1.5);
+            this->marker_->setPosition((1.0 + coord.x - size * 1.5) * 0.5, (1.0 - coord.y - size * 1.5) * 0.5);
+        }
+    }
+
+    void HUDRadar::radarTick(float dt)
+    {
+        for (itRadarDots_ = radarDots_.begin(); itRadarDots_ != radarDots_.end(); ++itRadarDots_)
+            (*itRadarDots_)->hide();
+        this->itRadarDots_ = this->radarDots_.begin();
+        this->marker_->hide();
+    }
+
+    void HUDRadar::changedOwner()
+    {
+        SUPER(HUDRadar, changedOwner);
+
+        this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/HUDRadar.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/HUDRadar.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/HUDRadar.h	(revision 5720)
@@ -0,0 +1,85 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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
+ *      Felix Schulthess
+ *   Co-authors:
+ *      Reto Grieder
+ *
+ */
+
+#ifndef _HUDRadar_H__
+#define _HUDRadar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <vector>
+
+#include "util/OgreForwardRefs.h"
+#include "interfaces/RadarListener.h"
+#include "interfaces/RadarViewable.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDRadar : public OrxonoxOverlay, public RadarListener
+    {
+    public:
+        HUDRadar(BaseObject* creator);
+        virtual ~HUDRadar();
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+        virtual void changedOwner();
+
+    private:
+        // XML accessors
+        float getHalfDotSizeDistance() const { return this->halfDotSizeDistance_; }
+        void setHalfDotSizeDistance(float distance) { this->halfDotSizeDistance_ = distance; }
+
+        float getMaximumDotSize() const { return this->maximumDotSize_; }
+        void setMaximumDotSize(float size) { this->maximumDotSize_ = size; }
+
+        float getRadarSensitivity() const { return this->sensitivity_; }
+        // used also by RadarListener interface!
+        void setRadarSensitivity(float sensitivity) { this->sensitivity_ = sensitivity; }
+
+        // RadarListener interface
+        void displayObject(RadarViewable* viewable, bool bIsMarked);
+        void radarTick(float dt);
+
+        std::map<RadarViewable::Shape, std::string> shapeMaterials_;
+
+        std::vector<Ogre::PanelOverlayElement*> radarDots_;
+        std::vector<Ogre::PanelOverlayElement*>::iterator itRadarDots_;
+        Ogre::PanelOverlayElement* marker_;
+
+        float halfDotSizeDistance_;
+        float maximumDotSize_;
+
+        float sensitivity_;
+
+        Pawn* owner_;
+    };
+}
+
+#endif /* _HUDRadar_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/HUDSpeedBar.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/HUDSpeedBar.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/HUDSpeedBar.cc	(revision 5720)
@@ -0,0 +1,69 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Felix Schulthess
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "HUDSpeedBar.h"
+
+#include "core/CoreIncludes.h"
+#include "objects/worldentities/pawns/SpaceShip.h"
+#include "objects/items/Engine.h"
+
+namespace orxonox
+{
+    CreateFactory(HUDSpeedBar);
+
+    HUDSpeedBar::HUDSpeedBar(BaseObject* creator)
+        : HUDBar(creator)
+    {
+        RegisterObject(HUDSpeedBar);
+
+        this->owner_ = 0;
+    }
+
+    HUDSpeedBar::~HUDSpeedBar()
+    {
+    }
+
+    void HUDSpeedBar::tick(float dt)
+    {
+        SUPER(HUDSpeedBar, tick, dt);
+
+        if (this->owner_ && this->owner_->getEngine())
+        {
+            float value = this->owner_->getVelocity().length() / (this->owner_->getEngine()->getMaxSpeedFront() * this->owner_->getEngine()->getSpeedFactor() * this->owner_->getEngine()->getBoostFactor());
+            this->setValue(value);
+        }
+    }
+
+    void HUDSpeedBar::changedOwner()
+    {
+        SUPER(HUDSpeedBar, changedOwner);
+
+        this->owner_ = orxonox_cast<SpaceShip*>(this->getOwner());
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/HUDSpeedBar.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/HUDSpeedBar.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/HUDSpeedBar.h	(revision 5720)
@@ -0,0 +1,53 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Felix Schulthess
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _HUDSpeedBar_H__
+#define _HUDSpeedBar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "HUDBar.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDSpeedBar : public HUDBar, public Tickable
+    {
+    public:
+        HUDSpeedBar(BaseObject* creator);
+        virtual ~HUDSpeedBar();
+
+        virtual void tick(float dt);
+        virtual void changedOwner();
+
+    private:
+        SpaceShip* owner_;
+    };
+}
+#endif /* _HUDSpeedBar_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/HUDTimer.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/HUDTimer.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/HUDTimer.cc	(revision 5720)
@@ -0,0 +1,72 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Aurelian Jaggi
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "HUDTimer.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "objects/worldentities/ControllableEntity.h"
+#include "objects/gametypes/Gametype.h"
+
+namespace orxonox
+{
+    CreateFactory(HUDTimer);
+
+    HUDTimer::HUDTimer(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(HUDTimer);
+
+        this->owner_ = 0;
+    }
+
+    HUDTimer::~HUDTimer()
+    {
+    }
+
+    void HUDTimer::tick(float dt)
+    {
+        SUPER(HUDTimer, tick, dt);
+
+        Gametype* gametype = this->getGametype();
+
+        if (gametype)
+        {
+            if (gametype->getTimerIsActive())
+            {
+                this->setCaption(multi_cast<std::string>(static_cast<int>(gametype->getTime()) + 1));
+            }
+        }
+    }
+
+    void HUDTimer::changedOwner()
+    {
+        SUPER(HUDTimer, changedOwner);
+
+        this->owner_ = orxonox_cast<ControllableEntity*>(this->getOwner());
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/HUDTimer.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/HUDTimer.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/HUDTimer.h	(revision 5720)
@@ -0,0 +1,53 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Aurelian Jaggi
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _HUDTimer_H__
+#define _HUDTimer_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDTimer : public OverlayText, public Tickable
+    {
+    public:
+        HUDTimer(BaseObject* creator);
+        virtual ~HUDTimer();
+
+        virtual void tick(float dt);
+
+        virtual void changedOwner();
+
+    private:
+        ControllableEntity* owner_;
+    };
+}
+#endif /* _HUDTimer_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/KillMessage.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/KillMessage.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/KillMessage.cc	(revision 5720)
@@ -0,0 +1,60 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "KillMessage.h"
+
+#include "core/CoreIncludes.h"
+#include "objects/infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateFactory(KillMessage);
+
+    KillMessage::KillMessage(BaseObject* creator) : FadeoutText(creator)
+    {
+        RegisterObject(KillMessage);
+
+        this->owner_ = 0;
+
+        this->setDelay(2.0f);
+        this->setFadeouttime(0.5f);
+    }
+
+    void KillMessage::killmessage(const GametypeInfo* gtinfo, const std::string& message)
+    {
+        if (this->owner_ && this->owner_->getGametypeInfo() == gtinfo)
+            this->setCaption(message);
+    }
+
+    void KillMessage::changedOwner()
+    {
+        SUPER(KillMessage, changedOwner);
+
+        this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner());
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/KillMessage.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/KillMessage.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/KillMessage.h	(revision 5720)
@@ -0,0 +1,53 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _KillMessage_H__
+#define _KillMessage_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "interfaces/GametypeMessageListener.h"
+#include "overlays/FadeoutText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport KillMessage : public FadeoutText, public GametypeMessageListener
+    {
+        public:
+            KillMessage(BaseObject* creator);
+            virtual ~KillMessage() {}
+
+            virtual void changedOwner();
+
+            void killmessage(const GametypeInfo* gtinfo, const std::string& message);
+
+        private:
+            PlayerInfo* owner_;
+    };
+}
+#endif /* _KillMessage_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/PongScore.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/PongScore.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/PongScore.cc	(revision 5720)
@@ -0,0 +1,139 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "PongScore.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "objects/gametypes/Pong.h"
+#include "objects/infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateFactory(PongScore);
+
+    PongScore::PongScore(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(PongScore);
+
+        this->owner_ = 0;
+
+        this->bShowName_ = false;
+        this->bShowScore_ = false;
+        this->bShowLeftPlayer_ = false;
+        this->bShowRightPlayer_ = false;
+    }
+
+    PongScore::~PongScore()
+    {
+    }
+
+    void PongScore::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(PongScore, XMLPort, xmlelement, mode);
+
+        XMLPortParam(PongScore, "showname",        setShowName,        getShowName,        xmlelement, mode).defaultValues(false);
+        XMLPortParam(PongScore, "showscore",       setShowScore,       getShowScore,       xmlelement, mode).defaultValues(false);
+        XMLPortParam(PongScore, "showleftplayer",  setShowLeftPlayer,  getShowLeftPlayer,  xmlelement, mode).defaultValues(false);
+        XMLPortParam(PongScore, "showrightplayer", setShowRightPlayer, getShowRightPlayer, xmlelement, mode).defaultValues(false);
+    }
+
+    void PongScore::tick(float dt)
+    {
+        SUPER(PongScore, tick, dt);
+
+        if (this->owner_)
+        {
+            PlayerInfo* player1 = this->owner_->getLeftPlayer();
+            PlayerInfo* player2 = this->owner_->getRightPlayer();
+
+            std::string name1;
+            std::string name2;
+
+            std::string score1 = "0";
+            std::string score2 = "0";
+
+            if (player1)
+            {
+                name1 = player1->getName();
+                score1 = multi_cast<std::string>(this->owner_->getScore(player1));
+            }
+
+            if (player2)
+            {
+                name2 = player2->getName();
+                score2 = multi_cast<std::string>(this->owner_->getScore(player2));
+            }
+
+            std::string output1;
+            if (this->bShowLeftPlayer_)
+            {
+                if (this->bShowName_ && this->bShowScore_ && player1)
+                    output1 = name1 + " - " + score1;
+                else if (this->bShowScore_)
+                    output1 = score1;
+                else if (this->bShowName_)
+                    output1 = name1;
+            }
+
+            std::string output2;
+            if (this->bShowRightPlayer_)
+            {
+                if (this->bShowName_ && this->bShowScore_ && player2)
+                    output2 = score2 + " - " + name2;
+                else if (this->bShowScore_)
+                    output2 = score2;
+                else if (this->bShowName_)
+                    output2 = name2;
+            }
+
+            std::string output = "PONG";
+            if (this->bShowName_ || this->bShowScore_)
+            {
+                if (this->bShowLeftPlayer_ && this->bShowRightPlayer_)
+                    output = output1 + ":" + output2;
+                else if (this->bShowLeftPlayer_ || this->bShowRightPlayer_)
+                    output = output1 + output2;
+            }
+
+            this->setCaption(output);
+        }
+    }
+
+
+    void PongScore::changedOwner()
+    {
+        SUPER(PongScore, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+            this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype());
+        else
+            this->owner_ = 0;
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/PongScore.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/PongScore.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/PongScore.h	(revision 5720)
@@ -0,0 +1,77 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _PongScore_H__
+#define _PongScore_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport PongScore : public OverlayText, public Tickable
+    {
+        public:
+            PongScore(BaseObject* creator);
+            virtual ~PongScore();
+
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedOwner();
+
+            inline void setShowName(bool value)
+                { this->bShowName_ = value; }
+            inline bool getShowName() const
+                { return this->bShowName_; }
+
+            inline void setShowScore(bool value)
+                { this->bShowScore_ = value; }
+            inline bool getShowScore() const
+                { return this->bShowScore_; }
+
+            inline void setShowLeftPlayer(bool value)
+                { this->bShowLeftPlayer_ = value; }
+            inline bool getShowLeftPlayer() const
+                { return this->bShowLeftPlayer_; }
+
+            inline void setShowRightPlayer(bool value)
+                { this->bShowRightPlayer_ = value; }
+            inline bool getShowRightPlayer() const
+                { return this->bShowRightPlayer_; }
+
+        private:
+            Pong* owner_;
+            bool bShowName_;
+            bool bShowScore_;
+            bool bShowLeftPlayer_;
+            bool bShowRightPlayer_;
+    };
+}
+#endif /* _PongScore_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/TeamBaseMatchScore.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/TeamBaseMatchScore.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/TeamBaseMatchScore.cc	(revision 5720)
@@ -0,0 +1,124 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "TeamBaseMatchScore.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "objects/gametypes/TeamBaseMatch.h"
+#include "objects/infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateFactory(TeamBaseMatchScore);
+
+    TeamBaseMatchScore::TeamBaseMatchScore(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(TeamBaseMatchScore);
+
+        this->owner_ = 0;
+
+        this->bShowBases_ = false;
+        this->bShowScore_ = false;
+        this->bShowLeftTeam_ = false;
+        this->bShowRightTeam_ = false;
+    }
+
+    TeamBaseMatchScore::~TeamBaseMatchScore()
+    {
+    }
+
+    void TeamBaseMatchScore::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(TeamBaseMatchScore, XMLPort, xmlelement, mode);
+
+        XMLPortParam(TeamBaseMatchScore, "showbases",     setShowBases,     getShowBases,     xmlelement, mode).defaultValues(false);
+        XMLPortParam(TeamBaseMatchScore, "showscore",     setShowScore,     getShowScore,     xmlelement, mode).defaultValues(false);
+        XMLPortParam(TeamBaseMatchScore, "showleftteam",  setShowLeftTeam,  getShowLeftTeam,  xmlelement, mode).defaultValues(false);
+        XMLPortParam(TeamBaseMatchScore, "showrightteam", setShowRightTeam, getShowRightTeam, xmlelement, mode).defaultValues(false);
+    }
+
+    void TeamBaseMatchScore::tick(float dt)
+    {
+        SUPER(TeamBaseMatchScore, tick, dt);
+
+        if (this->owner_)
+        {
+            std::string bases1 = "(" + multi_cast<std::string>(this->owner_->getTeamBases(0)) + ")";
+            std::string bases2 = "(" + multi_cast<std::string>(this->owner_->getTeamBases(1)) + ")";
+
+            std::string score1 = multi_cast<std::string>(this->owner_->getTeamPoints(0));
+            std::string score2 = multi_cast<std::string>(this->owner_->getTeamPoints(1));
+
+            std::string output1;
+            if (this->bShowLeftTeam_)
+            {
+                if (this->bShowBases_ && this->bShowScore_)
+                    output1 = bases1 + " - " + score1;
+                else if (this->bShowScore_)
+                    output1 = score1;
+                else if (this->bShowBases_)
+                    output1 = bases1;
+            }
+
+            std::string output2;
+            if (this->bShowRightTeam_)
+            {
+                if (this->bShowBases_ && this->bShowScore_)
+                    output2 = score2 + " - " + bases2;
+                else if (this->bShowScore_)
+                    output2 = score2;
+                else if (this->bShowBases_)
+                    output2 = bases2;
+            }
+
+            std::string output = "";
+            if (this->bShowBases_ || this->bShowScore_)
+            {
+                if (this->bShowLeftTeam_ && this->bShowRightTeam_)
+                    output = output1 + ":" + output2;
+                else if (this->bShowLeftTeam_ || this->bShowRightTeam_)
+                    output = output1 + output2;
+            }
+
+            this->setCaption(output);
+        }
+    }
+
+
+    void TeamBaseMatchScore::changedOwner()
+    {
+        SUPER(TeamBaseMatchScore, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+            this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype());
+        else
+            this->owner_ = 0;
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/TeamBaseMatchScore.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/TeamBaseMatchScore.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/TeamBaseMatchScore.h	(revision 5720)
@@ -0,0 +1,77 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _TeamBaseMatchScore_H__
+#define _TeamBaseMatchScore_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport TeamBaseMatchScore : public OverlayText, public Tickable
+    {
+        public:
+            TeamBaseMatchScore(BaseObject* creator);
+            virtual ~TeamBaseMatchScore();
+
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedOwner();
+
+            inline void setShowBases(bool value)
+                { this->bShowBases_ = value; }
+            inline bool getShowBases() const
+                { return this->bShowBases_; }
+
+            inline void setShowScore(bool value)
+                { this->bShowScore_ = value; }
+            inline bool getShowScore() const
+                { return this->bShowScore_; }
+
+            inline void setShowLeftTeam(bool value)
+                { this->bShowLeftTeam_ = value; }
+            inline bool getShowLeftTeam() const
+                { return this->bShowLeftTeam_; }
+
+            inline void setShowRightTeam(bool value)
+                { this->bShowRightTeam_ = value; }
+            inline bool getShowRightTeam() const
+                { return this->bShowRightTeam_; }
+
+        private:
+            TeamBaseMatch* owner_;
+            bool bShowBases_;
+            bool bShowScore_;
+            bool bShowLeftTeam_;
+            bool bShowRightTeam_;
+    };
+}
+#endif /* _TeamBaseMatchScore_H__ */
Index: code/branches/libraries2/src/modules/overlays/hud/UnderAttackHealthBar.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/UnderAttackHealthBar.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/UnderAttackHealthBar.cc	(revision 5720)
@@ -0,0 +1,97 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "UnderAttackHealthBar.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "objects/infos/PlayerInfo.h"
+#include "objects/gametypes/UnderAttack.h"
+#include "objects/worldentities/pawns/Destroyer.h"
+
+namespace orxonox
+{
+    CreateFactory(UnderAttackHealthBar);
+
+    UnderAttackHealthBar::UnderAttackHealthBar(BaseObject* creator) : HUDHealthBar(creator)
+    {
+        RegisterObject(UnderAttackHealthBar);
+
+        this->owner_ = 0;
+
+        this->text_ = new OverlayText(this);
+        this->text_->setFont("Monofur");
+        this->text_->setTextSize(0.04f);
+        this->text_->setAlignmentString("center");
+        this->text_->setColour(ColourValue::White);
+        this->text_->setPickPoint(Vector2(0.5, 0));
+
+        this->inittimer_.setTimer(0.0f, false, this, createExecutor(createFunctor(&UnderAttackHealthBar::init)));
+    }
+
+    UnderAttackHealthBar::~UnderAttackHealthBar()
+    {
+        if (this->isInitialized())
+            delete this->text_;
+    }
+
+    void UnderAttackHealthBar::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(UnderAttackHealthBar, XMLPort, xmlelement, mode);
+
+        XMLPortParam(UnderAttackHealthBar, "descriptionpickpoint", setDescriptionPickPoint, getDescriptionPickPoint, xmlelement, mode);
+        XMLPortParam(UnderAttackHealthBar, "descriptionoffset", setDescriptionOffset, getDescriptionOffset, xmlelement, mode);
+    }
+
+    void UnderAttackHealthBar::changedOwner()
+    {
+        SUPER(UnderAttackHealthBar, changedOwner);
+
+        PlayerInfo* player = orxonox_cast<PlayerInfo*>(this->getOwner());
+        if (player)
+        {
+            this->owner_ = player;
+
+            UnderAttack* ua = orxonox_cast<UnderAttack*>(player->getGametype());
+            if (ua)
+            {
+                this->setOwner(ua->getDestroyer());
+
+                if (ua->getTeam(player) == 0)
+                    this->text_->setCaption("Attack the Transporter!");
+                else
+                    this->text_->setCaption("Defend the Transporter!");
+            }
+        }
+    }
+
+    void UnderAttackHealthBar::init()
+    {
+        this->setOwner(this->owner_);
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/hud/UnderAttackHealthBar.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/hud/UnderAttackHealthBar.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/hud/UnderAttackHealthBar.h	(revision 5720)
@@ -0,0 +1,67 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _UnderAttackHealthBar_H__
+#define _UnderAttackHealthBar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "util/Math.h"
+#include "tools/Timer.h"
+#include "HUDHealthBar.h"
+
+namespace orxonox
+{
+    class _OverlaysExport UnderAttackHealthBar : public HUDHealthBar
+    {
+        public:
+            UnderAttackHealthBar(BaseObject* creator);
+            ~UnderAttackHealthBar();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedOwner();
+
+            inline void setDescriptionPickPoint(const Vector2& pickpoint)
+                { this->text_->setPickPoint(pickpoint); }
+            inline Vector2 getDescriptionPickPoint() const
+                { return this->text_->getPickPoint(); }
+
+            inline void setDescriptionOffset(const Vector2& position)
+                { this->text_->setPosition(this->getPosition() + (position - this->getPickPoint()) * this->getSize()); }
+            inline Vector2 getDescriptionOffset() const
+                { return (this->text_->getPosition() - this->getPosition()) / this->getSize() + this->getPickPoint(); }
+
+        private:
+            void init();
+
+            PlayerInfo* owner_;
+            OverlayText* text_;
+            Timer<UnderAttackHealthBar> inittimer_;
+    };
+}
+#endif /* _UnderAttackHealthBar_H__ */
Index: code/branches/libraries2/src/modules/overlays/stats/CMakeLists.txt
===================================================================
--- code/branches/libraries2/src/modules/overlays/stats/CMakeLists.txt	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/stats/CMakeLists.txt	(revision 5720)
@@ -0,0 +1,5 @@
+ADD_SOURCE_FILES(OVERLAYS_SRC_FILES
+  CreateLines.cc
+  Scoreboard.cc
+  Stats.cc
+)
Index: code/branches/libraries2/src/modules/overlays/stats/CreateLines.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/stats/CreateLines.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/stats/CreateLines.cc	(revision 5720)
@@ -0,0 +1,125 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Benjamin Hildebrandt
+ *
+ */
+
+#include "CreateLines.h"
+
+#include "overlays/OverlayText.h"
+#include "overlays/stats/Stats.h"
+
+namespace orxonox
+{
+    /**
+        @brief Constructor: Creates a line.
+    */
+    CreateLines::CreateLines(float leftOffset, float topOffset, float width, float height)
+    {
+        playerNameText_ = new OverlayText(0);
+        playerNameText_->setTextSize(0.04);
+        playerNameText_->setColour(ColourValue(0, 0.75, 0.2, 1));
+        playerNameText_->setPosition(Vector2(0.1, topOffset + 0.01));
+
+        scoreText_ = new OverlayText(0);
+        scoreText_->setTextSize(0.04);
+        scoreText_->setColour(ColourValue(0, 0.75, 0.2, 1));
+        scoreText_->setPosition(Vector2(0.6, topOffset + 0.01));
+
+        deathsText_ = new OverlayText(0);
+        deathsText_->setTextSize(0.04);
+        deathsText_->setColour(ColourValue(0, 0.75, 0.2, 1));
+        deathsText_->setPosition(Vector2(0.8, topOffset + 0.01));
+
+        background_ = new Stats(0);
+        background_->setPosition(Vector2(leftOffset, topOffset));
+        background_->setSize(Vector2(width, height));
+    }
+
+    CreateLines::~CreateLines()
+    {
+        delete this->playerNameText_;
+        delete this->scoreText_;
+        delete this->deathsText_;
+        delete this->background_;
+    }
+
+    void CreateLines::setPlayerName(const std::string& str)
+    {
+        this->playerNameText_->setCaption(str);
+    }
+
+    void CreateLines::setScore(const std::string& str)
+    {
+        this->scoreText_->setCaption(str);
+    }
+
+    void CreateLines::setDeaths(const std::string& str)
+    {
+        this->deathsText_->setCaption(str);
+    }
+
+    void CreateLines::setVisibility(bool visible)
+    {
+        this->scoreText_->setVisible(visible);
+        this->deathsText_->setVisible(visible);
+        this->playerNameText_->setVisible(visible);
+        this->background_->setVisible(visible);
+    }
+
+    /**
+        @brief Ensures that the number of OverlayElements is equal to numberOfColumns.
+    */
+    //void CreateLines::setNumberOfColumns(unsigned int numberOfColumns, unsigned int lineIndex) {
+
+    //    Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr();
+
+    //    unsigned int colIndex = 0;
+
+    //    while (textColumns_.size() < numberOfColumns)
+    //    {
+    //        Ogre::TextAreaOverlayElement* tempTextArea = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "StatsLineTextArea" + getName() + multi_cast<std::string>(lineIndex) + multi_cast<std::string>(colIndex)));
+    //        textColumns_.push_back(tempTextArea);
+    //        this->background_->addChild(tempTextArea);
+
+    //        colIndex++;
+    //    }
+
+    //    while (textColumns_.size() > numberOfColumns)
+    //    {
+    //        this->background_->_removeChild(textColumns_.back());
+    //        ovMan->destroyOverlayElement(textColumns_.back());
+    //        textColumns_.pop_back();
+    //    }
+    //}
+
+    //void CreateLines::alignColumn(int columnIndex, float leftOffset, float topOffset)
+    //{
+    //    this->textColumns_[columnIndex]->setPosition(leftOffset, topOffset);
+    //}
+
+    //void CreateLines::setColumnText(int columnIndex, std::string columnText)
+    //{
+    //    this->textColumns_[columnIndex]->setCaption(columnText);
+    //}
+}
Index: code/branches/libraries2/src/modules/overlays/stats/CreateLines.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/stats/CreateLines.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/stats/CreateLines.h	(revision 5720)
@@ -0,0 +1,64 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Benjamin Hildebrandt
+ *
+ */
+
+#ifndef _CreateLines_H__
+#define _CreateLines_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+namespace orxonox
+{
+    class _OverlaysExport CreateLines
+    {
+
+    public: // functions
+        CreateLines(float, float, float, float);
+        virtual ~CreateLines();
+
+        void setPlayerName(const std::string&);
+        void setScore(const std::string&);
+        void setDeaths(const std::string&);
+
+        void setVisibility(bool);
+
+        //void setNumberOfColumns(unsigned int numberOfColumns, unsigned int lineIndex);
+        //void alignColumn(int columnIndex, float leftOffset, float topOffset);
+        //void setColumnText(int columnIndex, std::string columnText);
+
+    private: // functions
+
+    private: // variables
+        //std::vector<OverlayText*> textColumns_;
+        OverlayText* playerNameText_;
+        OverlayText* scoreText_;
+        OverlayText* deathsText_;
+
+        Stats* background_;
+
+    };
+}
+
+#endif /* _CreateLines_H__ */
Index: code/branches/libraries2/src/modules/overlays/stats/Scoreboard.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/stats/Scoreboard.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/stats/Scoreboard.cc	(revision 5720)
@@ -0,0 +1,129 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Benjamin Hildebrandt
+ *
+ */
+
+#include "Scoreboard.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "objects/gametypes/Gametype.h"
+#include "objects/infos/PlayerInfo.h"
+#include "CreateLines.h"
+
+namespace orxonox
+{
+    CreateFactory(Scoreboard);
+
+    /**
+        @brief Constructor: Creates the scoreboard.
+    */
+    Scoreboard::Scoreboard(BaseObject* creator)
+        : OrxonoxOverlay(creator)
+    {
+        RegisterObject(Scoreboard);
+    }
+
+    /**
+        @brief Initializes the lines.
+    */
+    void Scoreboard::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(Scoreboard, XMLPort, xmlElement, mode);
+    }
+
+    void Scoreboard::changedVisibility()
+    {
+        SUPER(Scoreboard, changedVisibility);
+
+        for (unsigned int i = 0; i < this->lines_.size(); ++i)
+            this->lines_[i]->setVisibility(this->isVisible());
+    }
+
+    /**
+        @brief Prints the scoreboard on the screen.
+    */
+    void Scoreboard::tick(float dt)
+    {
+        const std::map<PlayerInfo*, Player>& playerList = this->getGametype()->getPlayers();
+
+        const float topOffset  = 0.2;
+        const float leftOffset = 0.075;
+        const float distance   = 0.01;
+        const float width      = 0.85;
+        const float height     = 0.05;
+        while (playerList.size() > this->lines_.size())
+        {
+            // create new lines
+            CreateLines* lines = new CreateLines(leftOffset, topOffset + (distance + height) * lines_.size(), width, height);
+            lines->setVisibility(this->isVisible());
+            this->lines_.push_back(lines);
+        }
+        while (playerList.size() < this->lines_.size())
+        {
+            // destroy lines
+            delete this->lines_.back();
+            this->lines_.pop_back();
+        }
+
+        // update board
+
+        unsigned int index = 0;
+        for (std::map<PlayerInfo*, Player>::const_iterator it = playerList.begin(); it != playerList.end(); ++it)
+        {
+            this->lines_[index]->setPlayerName(multi_cast<std::string>(it->first->getName()));
+            this->lines_[index]->setScore(multi_cast<std::string>(it->second.frags_));
+            this->lines_[index]->setDeaths(multi_cast<std::string>(it->second.killed_));
+            index++;
+        }
+
+        //numberOfColumns = 2;
+        //numberOfLines = 3;
+        //topOffset = 0.1;
+        //lineSpacing = 0.1;
+
+        //for (unsigned int i = 0; i < this->lines_.size(); ++i)
+        //{
+        //    columnIndex = 0;
+        //    leftOffset = 0.1;
+
+        //    this->createlines_->setNumberOfColumns(numberOfColumns, i);
+
+        //    // columnText = this->getGametype()->getPlayersName();
+        //    columnText = "PlayerName";
+        //    this->createlines_->alignColumn(columnIndex, topOffset, leftOffset);
+        //    this->createlines_->setColumnText(columnIndex, columnText);
+
+        //    columnIndex++;
+        //    leftOffset = leftOffset + 0.3;
+
+        //    // columnText = this->getGametype()->getPlayersFrags();
+        //    columnText = "PlayerFrags";
+        //    this->createlines_->alignColumn(columnIndex, topOffset, leftOffset);
+        //    this->createlines_->setColumnText(columnIndex, columnText);
+
+        //    topOffset = topOffset + lineSpacing;
+        //}
+    }
+}
Index: code/branches/libraries2/src/modules/overlays/stats/Scoreboard.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/stats/Scoreboard.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/stats/Scoreboard.h	(revision 5720)
@@ -0,0 +1,73 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Benjamin Hildebrandt
+ *
+ */
+
+#ifndef _Scoreboard_H__
+#define _Scoreboard_H__
+
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <string>
+#include <vector>
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport Scoreboard : public OrxonoxOverlay, public Tickable
+    {
+    public: // functions
+        Scoreboard(BaseObject* creator);
+        virtual ~Scoreboard() {}
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+        virtual void tick(float dt);
+
+        inline void setCreateLines(CreateLines* cl)
+            { this->createlines_ = cl; }
+        inline CreateLines* getCreateLines() const
+            { return this->createlines_; }
+
+        virtual void changedVisibility();
+
+    private: // functions
+        void printLines();
+
+    private: // variables
+        std::vector<CreateLines*> lines_;
+
+        unsigned int numberOfColumns;
+        unsigned int numberOfLines;
+        unsigned int columnIndex;
+        float topOffset;
+        float leftOffset;
+        float lineSpacing;
+        std::string columnText;
+        CreateLines* createlines_;
+    };
+}
+
+#endif /* _Scoreboard_H__ */
Index: code/branches/libraries2/src/modules/overlays/stats/Stats.cc
===================================================================
--- code/branches/libraries2/src/modules/overlays/stats/Stats.cc	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/stats/Stats.cc	(revision 5720)
@@ -0,0 +1,118 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Felix Schulthess
+ *   Co-authors:
+ *      Fabian 'x3n' Landau, Benjamin Hildebrandt
+ *
+ */
+
+#include "Stats.h"
+
+#include <string>
+#include <OgreOverlayManager.h>
+#include <OgreBorderPanelOverlayElement.h>
+
+#include "util/StringUtils.h"
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(Stats);
+
+    /**
+        @brief Constructor: Creates and initializes the Stats panel.
+    */
+    Stats::Stats(BaseObject* creator)
+        : OrxonoxOverlay(creator)
+        , statsOverlayNoise_(0)
+        , statsOverlayBorder_(0)
+    {
+        RegisterObject(Stats);
+
+        this->setConfigValues();
+
+        // create overlay and elements
+        Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr();
+
+        // create BorderPanel
+        this->statsOverlayBorder_ = static_cast<Ogre::BorderPanelOverlayElement*>(ovMan->createOverlayElement("BorderPanel", "StatsBorderPanel" + getUniqueNumberString()));
+        //this->statsOverlayBorder_->setMaterialName("StatsCenter");
+        this->statsOverlayBorder_->setBorderSize(0.003, 16 * 0.003);
+        this->statsOverlayBorder_->setBorderMaterialName("StatsBorder");
+        this->statsOverlayBorder_->setTopBorderUV(0.49, 0.0, 0.51, 0.5);
+        this->statsOverlayBorder_->setTopLeftBorderUV(0.0, 0.0, 0.5, 0.5);
+        this->statsOverlayBorder_->setTopRightBorderUV(0.5, 0.0, 1.0, 0.5);
+        this->statsOverlayBorder_->setLeftBorderUV(0.0, 0.49, 0.5, 0.51);
+        this->statsOverlayBorder_->setRightBorderUV(0.5, 0.49, 1.0, 0.5);
+        this->statsOverlayBorder_->setBottomBorderUV(0.49, 0.5, 0.51, 1.0);
+        this->statsOverlayBorder_->setBottomLeftBorderUV(0.0, 0.5, 0.5, 1.0);
+        this->statsOverlayBorder_->setBottomRightBorderUV(0.5, 0.5, 1.0, 1.0);
+
+        background_->addChild(statsOverlayBorder_);
+
+        // create noise
+        //this->statsOverlayNoise_ = static_cast<Ogre::PanelOverlayElement*>(ovMan->createOverlayElement("Panel", "StatsNoise" + getUniqueNumberString()));
+        //this->statsOverlayNoise_->setPosition(0,0);
+        //this->statsOverlayNoise_->setMaterialName("StatsNoiseSmall");
+        // comment following line to disable noise
+        //background_->addChild(this->statsOverlayNoise_);
+    }
+
+    Stats::~Stats()
+    {
+        if (this->isInitialized())
+        {
+            Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr();
+            ovMan->destroyOverlayElement(this->statsOverlayBorder_);
+            //ovMan->destroyOverlayElement(this->statsOverlayNoise_);
+        }
+    }
+
+    /**
+        @brief Sets the config values, describing the size of the Stats panel.
+    */
+    void Stats::setConfigValues()
+    {
+        SetConfigValue(noiseSize_, 1.0f);
+    }
+
+    /**
+        @brief Initializes the Stats panel.
+    */
+    void Stats::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        OrxonoxOverlay::XMLPort(xmlElement, mode);
+    }
+
+    void Stats::tick(float dt)
+    {
+        // SUPER(Stats, tick, dt);
+
+            // this creates a flickering effect (extracts exactly 80% of the texture at a random location)
+            //float uRand = (rand() & 1023) / 1023.0f * 0.2f;
+            //float vRand = (rand() & 1023) / 1023.0f * 0.2f;
+            //this->statsOverlayNoise_->setUV(uRand, vRand, 7.5f + uRand, 7.5f + vRand);
+    }
+
+}
Index: code/branches/libraries2/src/modules/overlays/stats/Stats.h
===================================================================
--- code/branches/libraries2/src/modules/overlays/stats/Stats.h	(revision 5720)
+++ code/branches/libraries2/src/modules/overlays/stats/Stats.h	(revision 5720)
@@ -0,0 +1,59 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   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:
+ *      Felix Schulthess
+ *   Co-authors:
+ *      Fabian 'x3n' Landau, Benjamin Hildebrandt
+ *
+ */
+
+#ifndef _Stats_H__
+#define _Stats_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "util/OgreForwardRefs.h"
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport Stats : public OrxonoxOverlay, public Tickable
+    {
+    public: // functions
+        Stats(BaseObject* creator);
+        virtual ~Stats();
+
+        void setConfigValues();
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+
+        virtual void tick(float dt);
+
+    private: // variables
+        Ogre::PanelOverlayElement* statsOverlayNoise_;
+        Ogre::BorderPanelOverlayElement* statsOverlayBorder_;
+        float noiseSize_;
+    };
+}
+
+#endif /* _Stats_H__ */
