Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/scrolling_screen.h @ 10466

Last change on this file since 10466 was 10466, checked in by patrick, 19 years ago

better implementation, scalable in both dim

File size: 1.2 KB
RevLine 
[10453]1#ifndef _SCROLLING_SCREEN_H
2#define _SCROLLING_SCREEN_H
3
4#include "world_entity.h"
5
6
7class TiXmlElement;
8class Material;
9
10class ScrollingScreen : public WorldEntity
11{
12  ObjectListDeclaration(ScrollingScreen);
13
14
15
16public:
17  ScrollingScreen();
18  ScrollingScreen(const TiXmlElement* root);
19  virtual ~ScrollingScreen();
20
[10464]21  typedef enum ScScMode
22  {
23     SCSC_FULL  = 0,
24     SCSC_VIEW
25  };
26
[10453]27  void init();
28  virtual void loadParams(const TiXmlElement* root);
29
30  void fadeIn(float speed);
31  void fadeOut(float speed);
32
[10455]33  void setTexture(const std::string& texture);
34
[10453]35  void setSpeed(float speed) { this->scrollingSpeed = speed; }
36  void setViewHeight(float height) { this->viewHeight = height; }
[10466]37  void setSizeY(float ySize) { this->ySize = ySize; }
38  void setSizeX(float xSize) { this->xSize = xSize; }
[10453]39
40  virtual void tick (float time);
41
42  virtual void draw() const;
[10464]43  void drawFull() const;
44  void drawView() const;
[10453]45
[10464]46
[10453]47private:
48  Material*       material;
49  bool            isTransparent;
50  float           transparency;
51  float           fadeingSpeed;
52
53  float           scrollingSpeed;
54  float           viewHeight;
[10457]55  float           offset;
[10460]56  float           ratio;
[10453]57
58  float           xSize;
59  float           ySize;
60
[10464]61  int             mode;
[10453]62
63};
64
65#endif /* _SCROLLING_SCREEN_H */
Note: See TracBrowser for help on using the repository browser.