source:
orxonox.OLD/trunk/src/world_entities/elements/glgui_energywidget.h
@
10539
Last change on this file since 10539 was 10368, checked in by patrick, 18 years ago | |
---|---|
File size: 979 bytes |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
[8972] | 2 | * @file glgui_energywidget.h |
3 | * @brief Definition of an EnergyWidget, that displays a bar and a Text | |
[3245] | 4 | */ |
[1853] | 5 | |
[8972] | 6 | #ifndef _GLGUI_ENERGY_WIDGET_H |
7 | #define _GLGUI_ENERGY_WIDGET_H | |
[1853] | 8 | |
[8974] | 9 | #include "glgui_box.h" |
[8972] | 10 | #include "glgui_bar.h" |
11 | #include "glgui_text.h" | |
[1853] | 12 | |
[8972] | 13 | namespace OrxGui |
14 | { | |
[3543] | 15 | |
[8972] | 16 | //! A class for ... |
[8974] | 17 | class GLGuiEnergyWidget : public GLGuiBox |
[8972] | 18 | { |
[3543] | 19 | |
[8973] | 20 | public: |
[8972] | 21 | GLGuiEnergyWidget(); |
22 | virtual ~GLGuiEnergyWidget(); | |
[2036] | 23 | |
[8977] | 24 | void setDisplayedName(const std::string& name); |
[8974] | 25 | void setMaximum(float max); |
26 | void setValue(float value); | |
27 | ||
[10368] | 28 | inline GLGuiWidget* getNameWidget() {return &this->_name;}; |
29 | inline GLGuiWidget* getValueWidget() {return &this->_valueText;}; | |
30 | inline GLGuiWidget* getBarWidget() {return &this->_bar;}; | |
31 | ||
[8973] | 32 | protected: |
[8981] | 33 | virtual void resize(); |
[8975] | 34 | virtual void showing(); |
35 | virtual void hiding(); | |
[1853] | 36 | |
[8973] | 37 | private: |
[8980] | 38 | GLGuiText _name; |
[8988] | 39 | GLGuiText _valueText; |
[8980] | 40 | GLGuiBar _bar; |
[1853] | 41 | |
[8972] | 42 | }; |
43 | } | |
44 | #endif /* _GLGUI_ENERGY_WIDGET_H */ |
Note: See TracBrowser
for help on using the repository browser.