Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 14, 2010, 7:54:41 PM (14 years ago)
Author:
scheusso
Message:

HUDRadar now working again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hudelements/src/orxonox/interfaces/RadarViewable.h

    r6717 r6727  
    4040namespace orxonox
    4141{
     42    class BaseObject;
     43
    4244    /**
    4345    @brief Interface for receiving window events.
     
    5557
    5658    public:
    57         RadarViewable();
     59        RadarViewable(BaseObject* creator);
    5860        virtual ~RadarViewable();
    5961
    6062        inline void setRadarObjectCamouflage(float camouflage)
    61             { this->radarObjectCamouflage_ = camouflage; }
     63            {
     64                if( this->radarObjectCamouflage_ != camouflage )
     65                {
     66                    this->radarObjectCamouflage_ = camouflage;
     67                    this->settingsChanged();
     68                }
     69            }
    6270        inline float getRadarObjectCamouflage() const
    6371            { return this->radarObjectCamouflage_; }
    6472
    6573        inline void setRadarObjectColour(const ColourValue& colour)
    66             { this->radarObjectColour_ = colour; }
     74            {
     75                if(this->radarObjectColour_ != colour)
     76                {
     77                    this->radarObjectColour_ = colour;
     78                    this->settingsChanged();
     79                }
     80            }
    6781        inline const ColourValue& getRadarObjectColour() const
    6882            { return this->radarObjectColour_; }
    6983
    70         void setRadarObjectDescription(const std::string& str);
    71         inline const std::string& getRadarObjectDescription() const
    72             { return this->radarObjectDescription_; }
     84//         void setRadarObjectDescription(const std::string& str);
     85//         inline const std::string& getRadarObjectDescription() const
     86//             { return this->radarObjectDescription_; }
    7387
    7488        inline void setRadarVisibility(bool b)
    75             { this->bVisibility_ = b; }
     89            {
     90                if(b!=this->bVisibility_)
     91                {
     92                    this->bVisibility_ = b;
     93                    this->settingsChanged();
     94                }
     95            }
    7696        inline bool getRadarVisibility() const
    7797            { return this->bVisibility_; }
     
    83103
    84104        inline void setRadarObjectShape(Shape shape)
    85             { this->radarObjectShape_ = shape; }
     105            {
     106                if( this->radarObjectShape_ != shape )
     107                {
     108                    this->radarObjectShape_ = shape;
     109                    this->settingsChanged();
     110                }
     111            }
    86112        inline Shape getRadarObjectShape() const
    87113            { return this->radarObjectShape_; }
     114        void settingsChanged();
    88115
    89116
     
    98125        void validate(const WorldEntity* object) const;
    99126        bool bVisibility_;
     127        bool bInitialized_;
    100128        //Map
    101129        std::string uniqueId_;
     130        BaseObject* creator_;
    102131
    103132
Note: See TracChangeset for help on using the changeset viewer.