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/HUDNavigation.h

    r1614 r1615  
    3939    class _OrxonoxExport HUDNavigation : public OrxonoxOverlay, public Tickable
    4040    {
    41       public:
     41    public:
    4242        HUDNavigation();
    4343        ~HUDNavigation();
     
    4545        void XMLPort(Element& xmlElement, XMLPort::Mode mode);
    4646
    47         void tick(float dt);
    48 
    49         float getDist2Focus() const;
    50 
    51       protected:
     47    private:
    5248        void sizeChanged();
    5349        void angleChanged() { }
    5450        void positionChanged() { }
    5551
    56       private:
    57         HUDNavigation(HUDNavigation& instance);
     52        void tick(float dt);
     53
     54        // XMLPort accessors
     55        void setNavMarkerSize(float size) { this->navMarkerSize_ = size; }
     56        float getNavMarkerSize() const    { return this->navMarkerSize_; }
     57
     58        void setAimMarkerSize(float size) { this->aimMarkerSize_ = size; }
     59        float getAimMarkerSize() const    { return this->aimMarkerSize_; }
     60
     61        void setTextSize(float size);
     62        float getTextSize() const;
     63
     64        void setFont(const std::string& font);
     65        const std::string& getFont() const;
     66
    5867        void updateMarker();
    5968        void updateFocus();
     69        float getDist2Focus() const;
    6070
    61         // XMLPort accessors
    62         void setNavMarkerSize(float size);
    63         float getNavMarkerSize() const;
    64         void setAimMarkerSize(float size);
    65         float getAimMarkerSize() const;
    66         void setTextSize(float size);
    67         float getTextSize() const;
    68         void setFont(const std::string& font);
    69         std::string getFont() const;
    70 
    71         Ogre::OverlayContainer* container_;         //!< Container that holds the navigation elements
    7271        Ogre::PanelOverlayElement* navMarker_;      //!< the panel used to show the arrow and the target marker
    7372        float navMarkerSize_;                       //!< One paramter size of the navigation marker
     
    7675        Ogre::TextAreaOverlayElement* navText_;     //!< Text overlay to display the target distance
    7776        bool wasOutOfView_;                         //!< Performance booster variable: setMaterial is not cheap
    78   };
     77    };
    7978}
    8079
Note: See TracChangeset for help on using the changeset viewer.