| [3357] | 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: | 
|---|
| [4099] | 18 |   GLMenuImageScreen (); | 
|---|
| [4261] | 19 |   GLMenuImageScreen (const TiXmlElement* root); | 
|---|
 | 20 |   void loadParams(const 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); | 
|---|
| [4261] | 30 |   void setPosScale(float offsetX, float offsetY, float scaleX, float scaleY); | 
|---|
| [4099] | 31 |  | 
|---|
 | 32 |   void setBarImage(const char* barImage); | 
|---|
 | 33 |   void setBarPosScale(float barX, float barY, float barW, float barH); | 
|---|
 | 34 |  | 
|---|
| [3368] | 35 |   void setMaximum (int maxValue); | 
|---|
| [4453] | 36 |   /** \returns the maximum of countable steps*/ | 
|---|
 | 37 |   inline int GLMenuImageScreen::getMaximum(void) const { return this->maxValue; }; | 
|---|
 | 38 |  | 
|---|
| [3363] | 39 |   void setValue (int currentValue); | 
|---|
 | 40 |   int getValue (); | 
|---|
 | 41 |   void step (); | 
|---|
| [3357] | 42 |  | 
|---|
| [4451] | 43 |  | 
|---|
| [3357] | 44 |  private: | 
|---|
| [4453] | 45 |   // background image | 
|---|
 | 46 |   char*         backImageName;       //!< the name of the file of the background image | 
|---|
 | 47 |   float         offsetX;             //!< X-offset of the the image from the left | 
|---|
 | 48 |   float         offsetY;             //!< Y-offset of the image from the top | 
|---|
 | 49 |   float         scaleX;              //!< width of the image | 
|---|
 | 50 |   float         scaleY;              //!< height of the image | 
|---|
 | 51 |   Material*     backMat;             //!< Background Material. | 
|---|
| [3675] | 52 |  | 
|---|
| [4453] | 53 |   // Load-Bar | 
|---|
 | 54 |   float         barX;                //!< X-position of the Bar | 
|---|
 | 55 |   float         barY;                //!< Y-position of the Bar | 
|---|
 | 56 |   float         barW;                //!< Width of the Bat | 
|---|
 | 57 |   float         barH;                //!< Height of the Bar. | 
|---|
 | 58 |   Material*     barMat;              //!< A Material for the Loading-Bar | 
|---|
 | 59 |  | 
|---|
| [3675] | 60 |   /* progress bar values */ | 
|---|
| [4453] | 61 |   int           currentValue;        //!< the current count of step() calls fired yet | 
|---|
 | 62 |   int           maxValue;            //!< total count of steps | 
|---|
| [3363] | 63 |  | 
|---|
| [3357] | 64 | }; | 
|---|
 | 65 |  | 
|---|
 | 66 | #endif /* _GLMENU_IMAGESCREEN_H */ | 
|---|