Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 22, 2008, 2:56:48 PM (16 years ago)
Author:
scheusso
Message:

merged hud3 branch into trunk and changed camera orientation

File:
1 edited

Legend:

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

    r1056 r1362  
    11/*
    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  *      ...
    26  *
    27  */
     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*/
     27
    2828
    2929#ifndef _HUD_H__
    3030#define _HUD_H__
    3131
     32#include <string.h>
     33#include <OgreOverlayElement.h>
     34#include <OgreTextAreaOverlayElement.h>
     35#include <OgrePrerequisites.h>
     36
    3237#include "OrxonoxPrereqs.h"
    33 
    34 #include <string>
    35 
    36 #include <OgrePrerequisites.h>
     38#include "core/Tickable.h"
     39#include "BarOverlayElement.h"
     40#include "RadarOverlayElement.h"
    3741
    3842
    3943namespace orxonox
    4044{
    41   class _OrxonoxExport HUD
    42   {
    43   private:
    44     Ogre::OverlayElement* timeText_;
    45     Ogre::OverlayElement* targetWindowNameText_;
    46     Ogre::OverlayElement* targetWindowStatusText_;
    47     Ogre::OverlayElement* targetWindowDistanceText_;
    48     Ogre::OverlayElement* targetWindowHitRatingText_;
    49     Ogre::OverlayElement* energyLength_;
    50     Ogre::OverlayElement* shieldLeftTop_;
    51     Ogre::OverlayElement* shieldRightTop_;
    52     Ogre::OverlayElement* shieldLeftBottom_;
    53     Ogre::OverlayElement* shieldRightBottom_;
    54     Ogre::OverlayElement* rocketNum1_;
    55     Ogre::OverlayElement* rocketNum2_;
    56     Ogre::OverlayElement* rocketNum3_;
    57     Ogre::OverlayElement* rocketNum4_;
    58     Ogre::OverlayElement* energyDistrPoint_;
    59     Ogre::OverlayElement* primarChoice_;
     45    class _OrxonoxExport HUD : public Tickable
     46    {
     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;
    6055
    61     int timeMin_;
    62     int timeSec_;
     56        public:
     57            HUD(int zoom);
     58            ~HUD();
     59            virtual void tick(float);
    6360
    64     std::string targetWindowName_;
    65     std::string targetWindowStatus_;
    66     int targetWindowDistance_;
    67     int targetWindowHitRating_;
    68 
    69     int energyValue_;
    70 
    71     bool shieldLeftTopValue_;
    72     bool shieldRightTopValue_;
    73     bool shieldLeftBottomValue_;
    74     bool shieldRightBottomValue_;
    75 
    76     int rocket1_;
    77     int rocket2_;
    78     int rocket3_;
    79     int rocket4_;
    80 
    81     float energyDistrShield_;
    82     float energyDistrEngine_;
    83     float energyDistrLaser_;
    84 
    85     float energyDistrPixelX_;
    86     float energyDistrPixelY_;
    87 
    88     int primarValue_;
    89 
    90   public:
    91     HUD( void );
    92     ~HUD( void );
    93     void init( void );
    94 
    95     void setTime(int i, int j);
    96     void setTargetWindowName(std::string i);
    97     void setTargetWindowStatus(std::string i);
    98     void setTargetWindowDistance(int i);
    99     void setTargetWindowHitRating(int i);
    100     void setEnergyValue(int i);
    101     void setShieldLeftTopValue(bool i);
    102     void setShieldRightTopValue(bool i);
    103     void setShieldLeftBottomValue(bool i);
    104     void setShieldRightBottomValue(bool i);
    105     void setRocket1(int i);
    106     void setRocket2(int i);
    107     void setRocket3(int i);
    108     void setRocket4(int i);
    109     void setEnergyDistr(float s, float e, float l);
    110     void setPrimar(int i);
    111 
    112   };
     61    };
    11362}
    11463
    115 #endif /* _HUD_H__ */
     64#endif
Note: See TracChangeset for help on using the changeset viewer.