Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 15, 2008, 1:09:07 AM (17 years ago)
Author:
rgrieder
Message:
  • adjusted Radar to fit in XML loading scheme
  • OverlayGroup should be more or less what I imagine for now (only supports scale method to scale the entire HUD)
  • singletonized HUDNavigation (and HUDRadar of course): These are temporary hacks!
File:
1 edited

Legend:

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

    r1601 r1604  
    2121 *
    2222 *   Author:
    23  *      Yuning Chai
     23 *      Reto Grieder
    2424 *   Co-authors:
    25  *      Felix Schulthess
     25 *      ...
    2626 *
    2727 */
    28 
    2928
    3029#ifndef _OverlayGroup_H__
     
    3332#include "OrxonoxPrereqs.h"
    3433
     34#include <map>
    3535#include <OgrePrerequisites.h>
    36 #include <OgreTextAreaOverlayElement.h>
    3736#include "core/BaseObject.h"
    38 #include "objects/Tickable.h"
    3937#include "util/Math.h"
    40 #include "hud/OverlayElementFactories.h"
    41 #include "tools/WindowEventListener.h"
    4238
    4339namespace orxonox
     
    4642    class OrxonoxOverlay;
    4743
    48     class _OrxonoxExport OverlayGroup : public BaseObject, public TickableReal, public WindowEventListener
     44    class _OrxonoxExport OverlayGroup : public BaseObject
    4945    {
    5046      public:
     
    5450        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
    5551
    56         virtual void tick(float);
     52        void scale(const Vector2& scale);
     53        Vector2 getScale() const { return this->scale_; }
    5754
    58         void resize();
    59         void addRadarObject(WorldEntity* object, const ColourValue& colour = ColourValue(0.5, 0.5, 0.5, 1));
    60         void removeRadarObject(WorldEntity* object);
    61         void setFPS();
    62 
    63         inline std::list<RadarObject*>& getRadarObjects()
    64             { return this->roSet_; }
    65 
     55        static void toggleVisibility(const std::string& name);
    6656        static OverlayGroup& getHUD();
    67 
    68         static void setEnergy(float value);
    69         static void cycleNavigationFocus();
    70         static void releaseNavigationFocus();
    71         static void toggleVisibility(const std::string& name);
    7257
    7358      private:
     
    7762        OrxonoxOverlay* getElement(unsigned int index);
    7863
    79         void windowResized(int newWidth, int newHeight);
    80 
    8164        std::map<std::string, OrxonoxOverlay*> hudElements_;
    82 
    83         std::list<RadarObject*> roSet_;
    84 
    85         RadarOverlayElementFactory radarOverlayElementFactory_;
    86 
    87         Ogre::Overlay* orxonoxHUD_;
    88         Ogre::OverlayContainer* container_;
    89         Ogre::TextAreaOverlayElement* fpsText_;
    90         Ogre::TextAreaOverlayElement* rTRText_;
    91         HUDBar* energyBar_;
    92         BarOverlayElement* speedoBar_;
    93         RadarOverlayElement* radar_;
    94         HUDNavigation* nav_;
    95 
    96         bool showFPS_;
    97         bool showRenderTime_;
     65        Vector2 scale_;
    9866
    9967        static OverlayGroup* hudInstance_s;
Note: See TracChangeset for help on using the changeset viewer.