Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 22, 2008, 12:06:55 AM (16 years ago)
Author:
rgrieder
Message:
  • added blankString to String so you can return ""; even if it's a const std::string&
  • fixed several bugs with aspect correct and margin alignment
  • added console commands for OrxonoxOverlays and OverlayGroups for rotate, scale and scroll (you can access the by name (from name=.. in xml file), e.g. "OrxonoxOverlay rotateOverlay SpeedBar 90)
  • converted everything in overlays/ to 4 spaces/tab ;)
  • removed all using namespace Ogre;
  • added background_ Panel to OrxonoxOverlay, since most of the derived classes can use that
  • should work now, but I'll have to test on a tardis box first
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hud/src/orxonox/overlays/hud/HUDBar.h

    r1614 r1615  
    4141namespace orxonox
    4242{
    43   class _OrxonoxExport HUDBar : public OrxonoxOverlay
    44   {
     43    class _OrxonoxExport HUDBar : public OrxonoxOverlay
     44    {
    4545    public:
    46       HUDBar();
    47       virtual ~HUDBar();
     46        HUDBar();
     47        virtual ~HUDBar();
    4848
    49       virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
     49        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
    5050
    51       void setValue(float value);
    52       void addColour(float value, const ColourValue& colour);
    53       void clearColours();
     51        virtual void setValue(float value);
     52        void addColour(float value, const ColourValue& colour);
     53        void clearColours();
    5454
    55       inline void setRightToLeft(bool r2l)
     55        inline void setRightToLeft(bool r2l)
    5656        { this->right2Left_ = r2l; }
    57       inline bool getRightToLeft() const
     57        inline bool getRightToLeft() const
    5858        { return this->right2Left_; }
    59       inline float getValue() const
     59        inline float getValue() const
    6060        { return this->value_; }
    6161
    6262    private:
    63       static unsigned int materialcount_s;
    64       bool right2Left_;
    65       bool autoColour_;                   // whether bar changes colour automatically
    66       float value_;                       // progress of bar
    67       Ogre::PanelOverlayElement* bar_;
    68       Ogre::TextureUnitState* textureUnitState_;
    69       std::map<float, ColourValue> colours_;
     63        bool right2Left_;
     64        bool autoColour_;                   //!< whether bar changes colour automatically
     65        float value_;                       //!< progress of bar
    7066
    71       float barWidth_s;
    72       float barHeight_s;
    73       float barOffsetLeft_s;
    74       float barOffsetTop_s;
     67        Ogre::PanelOverlayElement* bar_;
     68        Ogre::TextureUnitState* textureUnitState_;
     69        std::map<float, ColourValue> colours_;
     70
     71        float barWidth_s;
     72        float barHeight_s;
     73        float barOffsetLeft_s;
     74        float barOffsetTop_s;
     75
     76        static unsigned int materialcount_s;
    7577    };
    7678}
Note: See TracChangeset for help on using the changeset viewer.