Last change
on this file since 10578 was
10468,
checked in by patrick, 18 years ago
|
added scriptable stuff to the now finished scrollertext. thx silvan for the good tutorial, it realy is complete
|
File size:
1.3 KB
|
Rev | Line | |
---|
[10453] | 1 | #ifndef _SCROLLING_SCREEN_H |
---|
| 2 | #define _SCROLLING_SCREEN_H |
---|
| 3 | |
---|
| 4 | #include "world_entity.h" |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | class TiXmlElement; |
---|
| 8 | class Material; |
---|
| 9 | |
---|
| 10 | class ScrollingScreen : public WorldEntity |
---|
| 11 | { |
---|
| 12 | ObjectListDeclaration(ScrollingScreen); |
---|
| 13 | |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | public: |
---|
| 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 | |
---|
[10468] | 30 | void start(); |
---|
| 31 | |
---|
[10453] | 32 | void fadeIn(float speed); |
---|
| 33 | void fadeOut(float speed); |
---|
| 34 | |
---|
[10455] | 35 | void setTexture(const std::string& texture); |
---|
| 36 | |
---|
[10453] | 37 | void setSpeed(float speed) { this->scrollingSpeed = speed; } |
---|
| 38 | void setViewHeight(float height) { this->viewHeight = height; } |
---|
[10466] | 39 | void setSizeY(float ySize) { this->ySize = ySize; } |
---|
| 40 | void setSizeX(float xSize) { this->xSize = xSize; } |
---|
[10453] | 41 | |
---|
| 42 | virtual void tick (float time); |
---|
| 43 | |
---|
| 44 | virtual void draw() const; |
---|
[10464] | 45 | void drawFull() const; |
---|
| 46 | void drawView() const; |
---|
[10453] | 47 | |
---|
[10464] | 48 | |
---|
[10453] | 49 | private: |
---|
| 50 | Material* material; |
---|
| 51 | bool isTransparent; |
---|
| 52 | float transparency; |
---|
| 53 | float fadeingSpeed; |
---|
| 54 | |
---|
| 55 | float scrollingSpeed; |
---|
| 56 | float viewHeight; |
---|
[10457] | 57 | float offset; |
---|
[10460] | 58 | float ratio; |
---|
[10453] | 59 | |
---|
| 60 | float xSize; |
---|
| 61 | float ySize; |
---|
| 62 | |
---|
[10464] | 63 | int mode; |
---|
[10453] | 64 | |
---|
[10468] | 65 | bool bRun; |
---|
[10453] | 66 | }; |
---|
| 67 | |
---|
| 68 | #endif /* _SCROLLING_SCREEN_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.