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