No code change just reformatting of header files.
finishing up my reformatting of the source from November/December following the guidelines that were posted. some extra things I added: * Any empty virtual declarations were kept to one line. * Enums were split up into separate lines to promote uniformity across all headers. ( each header file had a different style for enums)
This commit is contained in:
@@ -7,49 +7,49 @@ class JLBFont;
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
class TextScroller: public JGuiObject{
|
||||
class TextScroller: public JGuiObject
|
||||
{
|
||||
protected:
|
||||
string mText;
|
||||
string tempText;
|
||||
int fontId;
|
||||
float mWidth; // width of the text scroller object
|
||||
float mScrollSpeed;
|
||||
float mX;
|
||||
float mY;
|
||||
float start;
|
||||
int timer;
|
||||
|
||||
vector<string> strings;
|
||||
unsigned int currentId;
|
||||
int mRandom;
|
||||
int scrollDirection;
|
||||
string mText;
|
||||
string tempText;
|
||||
int fontId;
|
||||
float mWidth; // width of the text scroller object
|
||||
float mScrollSpeed;
|
||||
float mX;
|
||||
float mY;
|
||||
float start;
|
||||
int timer;
|
||||
|
||||
vector<string> strings;
|
||||
unsigned int currentId;
|
||||
int mRandom;
|
||||
int scrollDirection;
|
||||
|
||||
public:
|
||||
TextScroller(int fontId, float x, float y, float width, float speed = 30);
|
||||
void Add(string text);
|
||||
void Reset();
|
||||
void setRandom(int mode = 1);
|
||||
void Render();
|
||||
void Update(float dt);
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
TextScroller(int fontId, float x, float y, float width, float speed = 30);
|
||||
void Add(string text);
|
||||
void Reset();
|
||||
void setRandom(int mode = 1);
|
||||
void Render();
|
||||
void Update(float dt);
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
};
|
||||
|
||||
class VerticalTextScroller:
|
||||
public TextScroller
|
||||
class VerticalTextScroller: public TextScroller
|
||||
{
|
||||
private:
|
||||
size_t mNbItemsShown;
|
||||
float mHeight; // maximum height availble for display
|
||||
float mMarginX;
|
||||
float mMarginY; // margin used to allow text to scroll off screen without
|
||||
// affecting look and feel. Should be enough
|
||||
// for at least one line of text ( mY - line height of current font )
|
||||
float mOriginalY; // mY initially, used to restore scroller to original position after update
|
||||
size_t mNbItemsShown;
|
||||
float mHeight; // maximum height availble for display
|
||||
float mMarginX;
|
||||
float mMarginY; // margin used to allow text to scroll off screen without
|
||||
// affecting look and feel. Should be enough
|
||||
// for at least one line of text ( mY - line height of current font )
|
||||
float mOriginalY; // mY initially, used to restore scroller to original position after update
|
||||
|
||||
public:
|
||||
VerticalTextScroller(int fontId, float x, float y, float width, float height, float scrollSpeed = 30, size_t _minimumItems = 1);
|
||||
void Render();
|
||||
void Update(float dt);
|
||||
void Add(string text);
|
||||
VerticalTextScroller(int fontId, float x, float y, float width, float height, float scrollSpeed = 30, size_t _minimumItems = 1);
|
||||
void Render();
|
||||
void Update(float dt);
|
||||
void Add(string text);
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user