[4597] | 1 | /*! |
---|
[4453] | 2 | \file glmenu_imagescreen.h |
---|
| 3 | \brief class to display a LoadScreen |
---|
[3357] | 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef _GLMENU_IMAGESCREEN_H |
---|
| 7 | #define _GLMENU_IMAGESCREEN_H |
---|
| 8 | |
---|
[3543] | 9 | #include "base_object.h" |
---|
| 10 | |
---|
[3394] | 11 | class Material; |
---|
[4101] | 12 | class TiXmlElement; |
---|
[3357] | 13 | |
---|
[4453] | 14 | //! A class to display a loadScreen |
---|
[3357] | 15 | class GLMenuImageScreen : public BaseObject { |
---|
| 16 | |
---|
| 17 | public: |
---|
[4597] | 18 | GLMenuImageScreen (const TiXmlElement* root = NULL); |
---|
[4261] | 19 | void loadParams(const TiXmlElement* root); |
---|
[3544] | 20 | virtual ~GLMenuImageScreen (); |
---|
[3367] | 21 | |
---|
[4746] | 22 | void draw(); |
---|
[3357] | 23 | |
---|
[4099] | 24 | void setBackgroundImage(const char* backImageName); |
---|
| 25 | void setPosition(float offsetX, float offsetY); |
---|
| 26 | void setScale (float scaleX, float scaleY); |
---|
[4261] | 27 | void setPosScale(float offsetX, float offsetY, float scaleX, float scaleY); |
---|
[4099] | 28 | |
---|
| 29 | void setBarImage(const char* barImage); |
---|
| 30 | void setBarPosScale(float barX, float barY, float barW, float barH); |
---|
| 31 | |
---|
[3368] | 32 | void setMaximum (int maxValue); |
---|
[4453] | 33 | /** \returns the maximum of countable steps*/ |
---|
[4746] | 34 | inline int GLMenuImageScreen::getMaximum() const { return this->maxValue; }; |
---|
[4453] | 35 | |
---|
[3363] | 36 | void setValue (int currentValue); |
---|
[4746] | 37 | int getValue (); |
---|
[3363] | 38 | void step (); |
---|
[3357] | 39 | |
---|
[4451] | 40 | |
---|
[3357] | 41 | private: |
---|
[4453] | 42 | // background image |
---|
| 43 | char* backImageName; //!< the name of the file of the background image |
---|
| 44 | float offsetX; //!< X-offset of the the image from the left |
---|
| 45 | float offsetY; //!< Y-offset of the image from the top |
---|
| 46 | float scaleX; //!< width of the image |
---|
| 47 | float scaleY; //!< height of the image |
---|
| 48 | Material* backMat; //!< Background Material. |
---|
[3675] | 49 | |
---|
[4453] | 50 | // Load-Bar |
---|
| 51 | float barX; //!< X-position of the Bar |
---|
| 52 | float barY; //!< Y-position of the Bar |
---|
| 53 | float barW; //!< Width of the Bat |
---|
| 54 | float barH; //!< Height of the Bar. |
---|
| 55 | Material* barMat; //!< A Material for the Loading-Bar |
---|
| 56 | |
---|
[3675] | 57 | /* progress bar values */ |
---|
[4453] | 58 | int currentValue; //!< the current count of step() calls fired yet |
---|
| 59 | int maxValue; //!< total count of steps |
---|
[3363] | 60 | |
---|
[3357] | 61 | }; |
---|
| 62 | |
---|
| 63 | #endif /* _GLMENU_IMAGESCREEN_H */ |
---|