Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 8, 2008, 11:12:22 AM (17 years ago)
Author:
chaiy
Message:

BarFactory created, but doesn't work yet

File:
1 edited

Legend:

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

    r991 r1002  
    3030#define _BAR_H__
    3131
     32#include <string>
     33#include <OgreColourValue.h>
     34#include <OgreOverlayElement.h>
     35#include <OgrePrerequisites.h>
    3236#include <string.h>
    33 #include <OgreOverlayElement.h>
    34 #include <OgreTextAreaOverlayElement.h>
    35 #include <OgrePrerequisites.h>
    3637#include "../OrxonoxPrereqs.h"
    3738
     
    4041namespace orxonox
    4142{
    42   class _OrxonoxExport Bar
     43  class Bar : public Ogre::OverlayElement
    4344  {
    4445  private:
    45     int percentage_;
    46     int dir_;   
    47     int left_;
    48     int top_;
    49     int width_;
    50     int height_;
     46    float percentage_;
     47    bool dir_;
     48    Ogre::ColourValue color_;
     49       
    5150       
    5251  public:
    53     static const int LEFT = 0;
    54     static const int UP = 1;
    55     static const int RIGHT = 2;
    56     static const int DOWN = 3;
    5752
    58     static const int RED = 0;
    59     static const int YELLOW = 1;
    60     static const int GREEN = 2;
    61 
    62     Ogre::OverlayElement* element;
    63 
    64     Bar(Ogre::Real left, Ogre::Real top, Ogre::Real width, Ogre::Real height,
    65         int dir, int colour, std::string name);
    66     ~Bar(void);
    67     void reset(int percentage);
    68     void setColour(int colour);
    69     void show();
    70     void hide();
    71    
    72   };
     53    Bar(const Ogre::String& name);
     54//    virtual ~Bar();
    7355
    7456
    75   class _OrxonoxExport SmartBar : public Bar
    76   {
    77   private:
    7857
    79   public:
    80     SmartBar(Ogre::Real left, Ogre::Real top, Ogre::Real width, Ogre::Real height,
    81         int dir, std::string name);
    82     ~SmartBar(void);
    83     void reset(int percentage);
    84   };
     58
     59/*    Bar(const Ogre::String& s);
     60    ~Bar(void);
     61    void setPercentage(float percentage);
     62    void setColor(Ogre::ColourValue color);
     63*/  };
    8564}
    8665
Note: See TracChangeset for help on using the changeset viewer.