| [3357] | 1 | /*! |
|---|
| 2 | \file glmenu_imagescreen |
|---|
| 3 | \brief class to display a image |
|---|
| 4 | */ |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | #ifndef _GLMENU_IMAGESCREEN_H |
|---|
| 8 | #define _GLMENU_IMAGESCREEN_H |
|---|
| 9 | |
|---|
| [3543] | 10 | #include "base_object.h" |
|---|
| 11 | |
|---|
| [3394] | 12 | class Material; |
|---|
| [4101] | 13 | class TiXmlElement; |
|---|
| [3357] | 14 | |
|---|
| 15 | class GLMenuImageScreen : public BaseObject { |
|---|
| 16 | |
|---|
| 17 | public: |
|---|
| [4099] | 18 | GLMenuImageScreen (); |
|---|
| [4101] | 19 | GLMenuImageScreen (TiXmlElement* root); |
|---|
| [4104] | 20 | void load(TiXmlElement* root); |
|---|
| [3544] | 21 | virtual ~GLMenuImageScreen (); |
|---|
| [3367] | 22 | |
|---|
| [3357] | 23 | void init (); |
|---|
| 24 | |
|---|
| 25 | void draw (); |
|---|
| 26 | |
|---|
| [4099] | 27 | void setBackgroundImage(const char* backImageName); |
|---|
| 28 | void setPosition(float offsetX, float offsetY); |
|---|
| 29 | void setScale (float scaleX, float scaleY); |
|---|
| 30 | |
|---|
| 31 | void setBarImage(const char* barImage); |
|---|
| 32 | void setBarPosScale(float barX, float barY, float barW, float barH); |
|---|
| 33 | |
|---|
| [3368] | 34 | void setMaximum (int maxValue); |
|---|
| [3363] | 35 | int getMaximum (); |
|---|
| 36 | void setValue (int currentValue); |
|---|
| 37 | int getValue (); |
|---|
| 38 | void step (); |
|---|
| [3357] | 39 | |
|---|
| 40 | private: |
|---|
| [3394] | 41 | char* backImageName; //!< the name of the file of the background image |
|---|
| [4099] | 42 | float scaleX, scaleY; //!< hight and width of the image |
|---|
| [3394] | 43 | float offsetX, offsetY; //!< offset of the image from left and up |
|---|
| 44 | Material* backMat; //!< Background Material. |
|---|
| [4099] | 45 | float barX, barY, barW, barH; //!< Position and Scale of the bar. |
|---|
| 46 | Material* barMat; //!< A Material for the Loading-Bar |
|---|
| [3675] | 47 | |
|---|
| 48 | /* progress bar values */ |
|---|
| [3394] | 49 | int currentValue; //!< the current count of step() calls fired yet |
|---|
| 50 | int maxValue; //!< total count of steps |
|---|
| [3363] | 51 | |
|---|
| [3357] | 52 | }; |
|---|
| 53 | |
|---|
| 54 | #endif /* _GLMENU_IMAGESCREEN_H */ |
|---|