Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/hud/src/orxonox/hud/Bar.h @ 980

Last change on this file since 980 was 980, checked in by chaiy, 16 years ago

hallo

File size: 2.0 KB
Line 
1/*
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*      ...
25*
26*/
27
28
29#ifndef _BAR_H__
30#define _BAR_H__
31
32#include <string.h>
33#include <OgreOverlayElement.h>
34#include <OgreTextAreaOverlayElement.h>
35#include <OgrePrerequisites.h>
36#include "../OrxonoxPrereqs.h"
37
38
39
40namespace orxonox
41{
42  class _OrxonoxExport Bar
43  {
44  private:
45    int percentage_;
46    int dir_;   
47    int left_;
48    int top_;
49    int width_;
50    int height_;
51       
52  public:
53    static const int LEFT = 0;
54    static const int UP = 1;
55    static const int RIGHT = 2;
56    static const int DOWN = 3;
57
58    static const int RED = 0;
59    static const int YELLOW = 1;
60    static const int GREEN = 2;
61
62    Ogre::OverlayElement* element;
63
64    Bar(Ogre::Real left, Ogre::Real top, Ogre::Real width, Ogre::Real height,
65        int dir, int colour, std::string name);
66    ~Bar(void);
67    void reset(int percentage);
68    void setColour(int colour);
69    void show();
70    void hide();
71   
72  };
73
74
75  class _OrxonoxExport SmartBar : public Bar
76  {
77  private:
78
79  public:
80    SmartBar(Ogre::Real left, Ogre::Real top, Ogre::Real width, Ogre::Real height,
81        int dir, std::string name);
82    ~SmartBar(void);
83    void reset(int percentage);
84  };
85}
86
87#endif
88
89
Note: See TracBrowser for help on using the repository browser.