Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/elements/glgui_energywidget.h @ 10683

Last change on this file since 10683 was 10368, checked in by patrick, 18 years ago

merged the branche playability into the trunk

File size: 979 bytes
Line 
1/*!
2 * @file glgui_energywidget.h
3 * @brief Definition of an EnergyWidget, that displays a bar and a Text
4*/
5
6#ifndef _GLGUI_ENERGY_WIDGET_H
7#define _GLGUI_ENERGY_WIDGET_H
8
9#include "glgui_box.h"
10#include "glgui_bar.h"
11#include "glgui_text.h"
12
13namespace OrxGui
14{
15
16  //! A class for ...
17  class GLGuiEnergyWidget : public GLGuiBox
18  {
19
20  public:
21    GLGuiEnergyWidget();
22    virtual ~GLGuiEnergyWidget();
23
24    void setDisplayedName(const std::string& name);
25    void setMaximum(float max);
26    void setValue(float value);
27
28    inline GLGuiWidget* getNameWidget() {return &this->_name;};
29    inline GLGuiWidget* getValueWidget() {return &this->_valueText;};
30    inline GLGuiWidget* getBarWidget() {return &this->_bar;};
31
32  protected:
33    virtual void resize();
34    virtual void showing();
35    virtual void hiding();
36
37  private:
38    GLGuiText               _name;
39    GLGuiText               _valueText;
40    GLGuiBar                _bar;
41
42  };
43}
44#endif /* _GLGUI_ENERGY_WIDGET_H */
Note: See TracBrowser for help on using the repository browser.