Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gl_gui/glmenu/glmenu_imagescreen.h @ 6779

Last change on this file since 6779 was 6512, checked in by bensch, 19 years ago

orxonox/trunk: loadParams is now virtual.
ALL THE CLASSES HAVE TO CALL

SuperClass::loadParams(root);

isntead of:
static_cast<SuperClass*>(this)→loadParams(root);

which was quite stupid anyways

File size: 2.0 KB
Line 
1/*!
2 * @file glmenu_imagescreen.h
3 * class to display a LoadScreen
4 */
5
6#ifndef _GLMENU_IMAGESCREEN_H
7#define _GLMENU_IMAGESCREEN_H
8
9#include "base_object.h"
10
11class Material;
12class TiXmlElement;
13
14//! A class to display a loadScreen
15class GLMenuImageScreen : public BaseObject {
16
17 public:
18  GLMenuImageScreen (const TiXmlElement* root = NULL);
19  virtual void loadParams(const TiXmlElement* root);
20  virtual ~GLMenuImageScreen ();
21
22  void draw();
23
24  void setBackgroundImage(const char* backImageName);
25  void setPosition(float offsetX, float offsetY);
26  void setScale (float scaleX, float scaleY);
27  void setPosScale(float offsetX, float offsetY, float scaleX, float scaleY);
28
29  void setBarImage(const char* barImage);
30  void setBarPosScale(float barX, float barY, float barW, float barH);
31
32  void setMaximum (int maxValue);
33  /** @returns the maximum of countable steps*/
34  inline int GLMenuImageScreen::getMaximum() const { return this->maxValue; };
35
36  void setValue (int currentValue);
37  int  getValue ();
38  void step ();
39
40
41 private:
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.
49
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
57  /* progress bar values */
58  int           currentValue;        //!< the current count of step() calls fired yet
59  int           maxValue;            //!< total count of steps
60
61};
62
63#endif /* _GLMENU_IMAGESCREEN_H */
Note: See TracBrowser for help on using the repository browser.