Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 1, 2008, 3:54:20 PM (16 years ago)
Author:
rgrieder
Message:
  • @everyone: Do not create a branch until I've added the svn:eol-style property correctly. Otherwise this would cost me another 4 hours or so when we want to merge back.
  • merged network branch back to trunk
  • I had to omit the changes from last evening concerning the line endings
  • might not work yet because of the line endings
  • @beni: script branch is the only branch still open. you probably will have to apply a patch because of inconsistent new lines
File:
1 edited

Legend:

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

    r1407 r1502  
    11/*
    2 *   ORXONOX - the hottest 3D action shooter ever to exist
    3 *
    4 *
    5 *   License notice:
    6 *
    7 *   This program is free software; you can redistribute it and/or
    8 *   modify it under the terms of the GNU General Public License
    9 *   as published by the Free Software Foundation; either version 2
    10 *   of the License, or (at your option) any later version.
    11 *
    12 *   This program is distributed in the hope that it will be useful,
    13 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    14 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15 *   GNU General Public License for more details.
    16 *
    17 *   You should have received a copy of the GNU General Public License
    18 *   along with this program; if not, write to the Free Software
    19 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    20 *
    21 *   Author:
    22 *      Yuning Chai
    23 *   Co-authors:
    24 *      Felix Schulthess
    25 *
    26 */
     2 *   ORXONOX - the hottest 3D action shooter ever to exist
     3 *                    > www.orxonox.net <
     4 *
     5 *
     6 *   License notice:
     7 *
     8 *   This program is free software; you can redistribute it and/or
     9 *   modify it under the terms of the GNU General Public License
     10 *   as published by the Free Software Foundation; either version 2
     11 *   of the License, or (at your option) any later version.
     12 *
     13 *   This program is distributed in the hope that it will be useful,
     14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 *   GNU General Public License for more details.
     17 *
     18 *   You should have received a copy of the GNU General Public License
     19 *   along with this program; if not, write to the Free Software
     20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     21 *
     22 *   Author:
     23 *      Yuning Chai
     24 *   Co-authors:
     25 *      Felix Schulthess
     26 *
     27 */
    2728
    2829
     
    3031#define _HUD_H__
    3132
    32 #include <string.h>
    33 #include <OgreOverlayElement.h>
     33#include "OrxonoxPrereqs.h"
     34
     35#include <OgrePrerequisites.h>
    3436#include <OgreTextAreaOverlayElement.h>
    35 #include <OgrePrerequisites.h>
    36 
    37 #include "OrxonoxPrereqs.h"
     37#include <OgreSceneNode.h>
    3838#include "core/Tickable.h"
    39 #include "BarOverlayElement.h"
    40 #include "RadarOverlayElement.h"
    41 
     39#include "util/Math.h"
    4240
    4341namespace orxonox
     
    4543    class _OrxonoxExport HUD : public Tickable
    4644    {
    47         private:
    48             Ogre::OverlayManager* om;
    49             Ogre::Overlay* orxonoxHUD;
    50             Ogre::OverlayContainer* container;
    51             Ogre::TextAreaOverlayElement* test;
    52             BarOverlayElement* energyBar;
    53             BarOverlayElement* speedoBar;
    54             RadarOverlayElement* radar;
     45      private:
     46        HUD();
     47        HUD(HUD& instance);
     48        ~HUD();
     49        Ogre::OverlayManager* om;
     50        Ogre::SceneManager* sm;
     51        Ogre::Overlay* orxonoxHUD;
     52        Ogre::OverlayContainer* container;
     53        Ogre::TextAreaOverlayElement* fpsText;
     54        Ogre::TextAreaOverlayElement* rTRText;
     55        BarOverlayElement* energyBar;
     56        BarOverlayElement* speedoBar;
     57        RadarOverlayElement* radar;
     58        Navigation* nav;
    5559
    56         public:
    57             HUD(int zoom);
    58             ~HUD();
    59             virtual void tick(float);
     60        bool showFPS;
     61        bool showRenderTime;
    6062
     63      public:
     64        virtual void tick(float);
     65        void addRadarObject(Ogre::SceneNode* node, int colour = 0);
     66        void removeRadarObject(Ogre::SceneNode* node);
     67        void setRenderTimeRatio(float ratio);
     68        void setFPS();
     69
     70        std::set<RadarObject*> roSet;
     71
     72        static HUD* instance_s;
     73        static HUD& getSingleton();
     74        static void setEnergy(float value);
     75        static void cycleNavigationFocus();
     76        static void toggleFPS();
     77        static void toggleRenderTime();
    6178    };
    6279}
    6380
    64 #endif
     81#endif /* _HUD_H__ */
Note: See TracChangeset for help on using the changeset viewer.