Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 21, 2008, 12:57:10 PM (16 years ago)
Author:
FelixSchulthess
Message:

removed some warnings caused by implicit conversion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hud3/src/orxonox/hud/BarOverlayElement.h~

    r1283 r1342  
    2222*      Yuning Chai
    2323*   Co-authors:
    24 *      ...
     24*      Felix Schulthess
    2525*
    2626*/
     
    4343  class _OrxonoxExport BarOverlayElement : public Ogre::PanelOverlayElement
    4444  {
    45   private:
    46     int percentage_;
    47     int dir_;   
    48     int left_;
    49     int top_;
    50     int width_;
    51     int height_;
    52 
    53     static Ogre::String& typeName_s;
    54 
    55   public:
    56 
    57     static const int LEFT = 0;
    58     static const int UP = 1;
    59     static const int RIGHT = 2;
    60     static const int DOWN = 3;
    61 
    62     static const int RED = 0;
    63     static const int YELLOW = 1;
    64     static const int GREEN = 2;
    65 
    66     BarOverlayElement(const Ogre::String& name);
    67     virtual ~BarOverlayElement();
    68     virtual void initialise();
    69 
    70     void initBarOverlayElement(Real left, Real top, Real width, Real height,
    71           int dir,  int colour);
    72 
    73     void reset(int percentage);
    74     void setColour(int colour);
    75 
    76   };
    77 
    78  
    79   class _OrxonoxExport SmartBarOverlayElement : public BarOverlayElement
    80   {
    8145    private:
     46        bool autoColor_;                    // whether bar changes color automatically
     47        float value_;                       // progress of bar
     48        int color_;
     49        int left_;
     50        int top_;
     51        int width_;
     52        int height_;
     53        int windowW_, windowH_;
     54        Ogre::Real leftRel_;
     55        Ogre::Real topRel_;
     56        Ogre::Real widthRel_;
     57        Ogre::Real heightRel_;
     58        Ogre::OverlayManager* om;           // our overlay manager
     59        Ogre::OverlayContainer* container_; // our parent container to attach to
     60        Ogre::OverlayContainer* background_;
     61        Ogre::String name_;
    8262
    8363    public:
    84      
    85       SmartBarOverlayElement(const Ogre::String& name);
    86       virtual ~SmartBarOverlayElement(void);
    87       virtual void initialise();
    88      
    89       void initSmartBarOverlayElement(Ogre::Real left, Ogre::Real top, Ogre::Real width, Ogre::Real height, int dir);
    90       void reset(int percentage);
    91      
    92   };
     64        bool left2Right;
     65        static const int RED = 0;           // predefined colors
     66        static const int YELLOW = 1;
     67        static const int GREEN = 2;
     68
     69        BarOverlayElement(const Ogre::String& name);
     70        virtual ~BarOverlayElement();
     71        void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);
     72        void resize();
     73        void setValue(float value);
     74        void setColor(int color);
     75        float getValue();
     76        int getBarColor();
     77    };
    9378}
    94 
    9579#endif
    9680
Note: See TracChangeset for help on using the changeset viewer.