Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 8, 2008, 11:34:55 PM (16 years ago)
Author:
landauf
Message:
  • BarOverlayElement interpolates between given colours
  • Tried to fix a bug when releasing navigation focus
File:
1 edited

Legend:

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

    r1564 r1568  
    2424 *   Co-authors:
    2525 *      Felix Schulthess
     26 *      Fabian 'x3n' Landau
    2627 *
    2728 */
     
    3233#include "OrxonoxPrereqs.h"
    3334
     35#include <map>
     36
    3437#include <OgrePrerequisites.h>
    3538#include <OgrePanelOverlayElement.h>
     39
     40#include "util/Math.h"
    3641
    3742namespace orxonox
     
    4651      void resize();
    4752      void setValue(float value);
    48       void setColour(int colour);
     53      void addColour(float value, const ColourValue& colour);
     54      void clearColours();
    4955
    5056      inline void setRightToLeft(bool r2l)
     
    5460      inline float getValue() const
    5561        { return this->value_; }
    56       inline int getBarColour() const
    57         { return this->colour_; }
    5862
    5963    private:
    60       static const int RED = 0;           // predefined colours
    61       static const int YELLOW = 1;
    62       static const int GREEN = 2;
    63 
     64      static unsigned int materialcount_s;
    6465      bool right2Left_;
    6566      bool autoColour_;                   // whether bar changes colour automatically
    6667      float value_;                       // progress of bar
    67       int colour_;
    6868      int left_;
    6969      int top_;
     
    7878      Ogre::OverlayContainer* background_;
    7979      Ogre::String name_;
     80      Ogre::TextureUnitState* textureUnitState_;
     81      std::map<float, ColourValue> colours_;
    8082    };
    8183}
Note: See TracChangeset for help on using the changeset viewer.