Files
wagic/projects/mtg/include/TextScroller.h
techdragon.nguyen@gmail.com 4a3d7faf0a added Reward and Expiration to task list
moved text scroller into DeckMenu class since it is specific to DeckMenu and not GameStateDuel
added new util function "wordWrap"
2010-11-03 00:15:12 +00:00

39 lines
780 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;
int fontId;
float mWidth;
float mSpeed;
float mX;
float mY;
float start;
int timer;
int minimumItems;
vector<string> strings;
unsigned int currentId;
int mRandom;
int scrollDirection;
public:
void Add(string text);
void Reset();
void setRandom(int mode = 1);
TextScroller(int fontId, float x, float y, float width, float speed = 30, int scrollerType = 0, int _minimumItems = 2);
void Render();
void Update(float dt);
virtual ostream& toString(ostream& out) const;
};
#endif