Files
wagic/projects/mtg/include/TextScroller.h
wagic.the.homebrew@gmail.com 19b0b306fe Erwan
- stats are computed only at startup now, to avoid useless computation ingame
2009-05-31 09:42:08 +00:00

35 lines
695 B
C++

#ifndef _TEXTSCROLLER_H_
#define _TEXTSCROLLER_H_
class JLBFont;
#include <JGui.h>
#include <string>
#include <vector>
using namespace std;
class TextScroller: public JGuiObject{
protected:
string mText;
string tempText;
JLBFont * mFont;
float mWidth;
float mSpeed;
float mX;
float mY;
float start;
int timer;
vector<string> strings;
unsigned int currentId;
int mRandom;
public:
void Add(string text);
void Reset();
void setRandom(int mode = 1);
TextScroller(JLBFont * font, float x, float y, float width, float speed = 30);
void Render();
void Update(float dt);
virtual ostream& toString(ostream& out) const;
};
#endif