Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2008, 10:51:53 PM (17 years ago)
Author:
FelixSchulthess
Message:

progress bars now resize automatically and have a new look

File:
1 edited

Legend:

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

    r1328 r1329  
    4444  {
    4545    private:
    46 
    47     bool autoColor_;                    // whether bar changes color automatically
    48     float value_;                       // progress of bar
    49     int dir_;                           // direction of progress
    50     int color_;
    51     int left_;
    52     int top_;
    53     int width_;
    54     int height_;
    55     int windowW_, windowH_;
    56     Ogre::Real leftRel_;
    57     Ogre::Real topRel_;
    58     Ogre::Real widthRel_;
    59     Ogre::Real heightRel_;
    60     Ogre::PanelOverlayElement* bar_;    // the actual bar
    61     Ogre::OverlayManager* om;           // our overlay manager
    62     Ogre::OverlayContainer* container_; // our parent container to attach to
    63     Ogre::String name_;
     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_;
    6462
    6563    public:
    66         // directions
    67         static const int RIGHT = 0;
    68         static const int UP = 1;
    69         static const int LEFT = 2;
    70         static const int DOWN = 3;
    71         // predefined colors
    72         static const int RED = 0;
     64        bool left2Right;
     65        static const int RED = 0;           // predefined colors
    7366        static const int YELLOW = 1;
    7467        static const int GREEN = 2;
     
    7669        BarOverlayElement(const Ogre::String& name);
    7770        virtual ~BarOverlayElement();
    78 
    7971        void init(Real leftRel, Real topRel, Real widthRel, Real heightRel, Ogre::OverlayContainer* container);
    80         void setDir(int dir);
     72        void resize();
    8173        void setValue(float value);
    8274        void setColor(int color);
    83 
    8475        float getValue();
    8576        int getBarColor();
Note: See TracChangeset for help on using the changeset viewer.