Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gl/glmenu/glmenu_imagescreen.h @ 9869

Last change on this file since 9869 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

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  ObjectListDeclaration(GLMenuImageScreen);
18public:
19  GLMenuImageScreen (const TiXmlElement* root = NULL);
20  virtual void loadParams(const TiXmlElement* root);
21  virtual ~GLMenuImageScreen ();
22
23  void draw();
24
25  void setBackgroundImage(const std::string& backImageName);
26  void setPosition(float offsetX, float offsetY);
27  void setScale (float scaleX, float scaleY);
28  void setPosScale(float offsetX, float offsetY, float scaleX, float scaleY);
29
30  void setBarImage(const std::string& barImage);
31  void setBarPosScale(float barX, float barY, float barW, float barH);
32
33  void setMaximum (int maxValue);
34  /** @returns the maximum of countable steps*/
35  inline int getMaximum() const { return this->maxValue; };
36
37  void setValue (int currentValue);
38  int  getValue ();
39  void step ();
40
41
42private:
43  // background image
44  std::string         backImageName;       //!< the name of the file of the background image
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.
50
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
58  /* progress bar values */
59  int           currentValue;        //!< the current count of step() calls fired yet
60  int           maxValue;            //!< total count of steps
61
62};
63
64#endif /* _GLMENU_IMAGESCREEN_H */
Note: See TracBrowser for help on using the repository browser.