Rev | Line | |
---|
[10107] | 1 | /*! |
---|
| 2 | * @file glgui_energywidgetvertical.h |
---|
| 3 | * @brief Definition of an EnergyWidgetVertical, that displays a bar and a Text |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef _GLGUI_ENERGY_WIDGET_VERTICAL_H |
---|
| 7 | #define _GLGUI_ENERGY_WIDGET_VERTICAL_H |
---|
| 8 | |
---|
| 9 | #include "glgui_box.h" |
---|
| 10 | #include "glgui_bar.h" |
---|
| 11 | #include "glgui_text.h" |
---|
| 12 | |
---|
| 13 | namespace OrxGui |
---|
| 14 | { |
---|
| 15 | |
---|
| 16 | //! A class for ... |
---|
| 17 | class GLGuiEnergyWidgetVertical : public GLGuiBox |
---|
| 18 | { |
---|
| 19 | |
---|
| 20 | public: |
---|
| 21 | GLGuiEnergyWidgetVertical(); |
---|
| 22 | virtual ~GLGuiEnergyWidgetVertical(); |
---|
| 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_VERTICAL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.