Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1012


Ignore:
Timestamp:
Apr 10, 2008, 1:41:35 PM (17 years ago)
Author:
chaiy
Message:

hallo

Location:
code/branches/hud2/src/orxonox/hud
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hud2/src/orxonox/hud/Bar.cc

    r1002 r1012  
    2828#include <OgreOverlayManager.h>
    2929#include <OgreOverlayElement.h>
     30#include <OgreOverlayContainer.h>
     31#include <OgrePanelOverlayElement.h>
    3032#include <OgreStringConverter.h>
    3133#include <OgreColourValue.h>
    3234#include <string.h>
    3335
    34 #include "BarV1.h"
     36#include "Bar.h"
    3537
    3638namespace orxonox
     
    3840  using namespace Ogre;
    3941
    40     Bar::Bar(const String& name):Ogre::OverlayElement(name){}
     42//    typeName_s = "Bar";
     43
     44    Bar::Bar(const String& name):Ogre::PanelOverlayElement(name){
     45    }
    4146
    4247
     48    Bar::~Bar(){}
     49
     50//    const Ogre::String& Bar::getTypeName() const { return typeName_s;}
     51
     52
     53
     54    void Bar::initialise(){
     55        PanelOverlayElement::initialise();
     56        setDimensions(100,100);
     57        setPosition(10,10);
     58        setMaterialName("Orxonox/Green");
     59        setMetricsMode(Ogre::GMM_PIXELS);
     60    }
    4361
    4462
  • code/branches/hud2/src/orxonox/hud/Bar.h

    r1002 r1012  
    3232#include <string>
    3333#include <OgreColourValue.h>
     34#include <OgrePanelOverlayElement.h>
     35#include <OgreOverlayManager.h>
    3436#include <OgreOverlayElement.h>
     37#include <OgreOverlayContainer.h>
    3538#include <OgrePrerequisites.h>
    3639#include <string.h>
     
    4144namespace orxonox
    4245{
    43   class Bar : public Ogre::OverlayElement
     46  class _OrxonoxExport Bar : public Ogre::PanelOverlayElement
    4447  {
    4548  private:
     
    4851    Ogre::ColourValue color_;
    4952       
     53    static Ogre::String& typeName_s;
    5054       
    5155  public:
    5256
    5357    Bar(const Ogre::String& name);
     58
     59    virtual void initialise();
     60
     61    virtual ~Bar();
     62   
     63//    virtual const Ogre::String& getTypeName() const;
    5464//    virtual ~Bar();
    5565
  • code/branches/hud2/src/orxonox/hud/Factories.h

    r1002 r1012  
    5454
    5555
    56 
    57 
    58 
    59 
    60 
    61 
    62 
    63 
    64 
    65 
    66 
    67 
    68 
    69 
    70 
    7156#endif
  • code/branches/hud2/src/orxonox/hud/HUD.cc

    r1002 r1012  
    3232#include <OgreOverlayManager.h>
    3333#include <OgreSceneNode.h>
     34#include <OgreEntity.h>
    3435
    3536#include "HUD.h"
     
    6869    Ogre::OverlayElement* BarElement = overlayManager.createOverlayElementFromFactory("Bar", "BarElement");
    6970
    70 
    71 
    72 
     71    energyCounterPanel->addChild(BarElement);
    7372
    7473    Ogre::Overlay* orxonoxOverlay = overlayManager.create("Orxonox/HUD");
     
    9392    {
    9493      this->ogreNode_->roll(Ogre::Degree(dt*200),Ogre::Node::TS_LOCAL);
    95       this->ogreNode_->yaw(Ogre::Degree(dt*200),Ogre::Node::TS_LOCAL);      
    96       this->ogreNode_->pitch(Ogre::Degree(dt*200),Ogre::Node::TS_LOCAL);     
     94      this->ogreNode_->yaw(Ogre::Degree(dt*200),Ogre::Node::TS_LOCAL);
     95      this->ogreNode_->pitch(Ogre::Degree(dt*200),Ogre::Node::TS_LOCAL);
    9796    }
    9897  }
  • code/branches/hud2/src/orxonox/hud/HUD.h

    r1000 r1012  
    6666
    6767
    68 #endif _HUD_H_
     68#endif
    6969
    7070/*#ifndef _HUD_H__
Note: See TracChangeset for help on using the changeset viewer.