7 #include "../Maths/Vec2.h" 28 Text(std::string text, std::string fontLocation,
int fontSize);
38 Text(std::string text, std::string fontLocation,
int r,
int g,
int b);
46 Text(std::string text, std::string fontLocation, SDL_Colour
fontColour);
57 Text(std::string text, std::string fontLocation,
int fontSize,
int r,
int g,
int b);
66 Text(std::string text, std::string fontLocation,
int fontSize, SDL_Colour fontColour);
103 void setFont(std::string inFontLocation);
109 void setText(std::string inText);
Creates a Text sprite for use with using the Text formating.
Definition: Text.h:12
void setText(std::string inText)
Sets the text.
Definition: Text.cpp:144
Contains the Vec2 structure with functions and overloaded operators.
Definition: Vec2.h:8
void setColour(int r, int g, int b)
Sets the colour of the text.
Definition: Text.cpp:97
std::string fontLocation
Definition: Text.h:127
void setFont(std::string inFontLocation)
Sets the font of the text.
Definition: Text.cpp:131
Text(std::string text, std::string fontLocation)
Constructs the Text Texture. Font size and colour will be default (size 10 and black).
Definition: Text.cpp:3
~Text()
Destructs the Text Texture.
Definition: Text.cpp:82
Vec2 getDimensions()
Gets the dimensions of the Text Texture.
Definition: Text.cpp:153
void createTextTexture()
Creates a Text Texture using the Text data.
Definition: Text.cpp:158
Creates a Sprite for use with 2D.
Definition: Sprite.h:11
Vec2 dimensions
The Texture dimensions.
Definition: Text.h:129
int fontSize
Font size.
Definition: Text.h:125
std::string text
The text and font location.
Definition: Text.h:127
TTF_Font * font
Font.
Definition: Text.h:119
void setFontSize(int inSize)
Sets the font size of the text.
Definition: Text.cpp:115
Sprite * surfaceData
The surface sprite.
Definition: Text.h:123
SDL_Colour fontColour
Font colour.
Definition: Text.h:121
void pushToScreen(Vec2 pos)
Pushes the Text Texture to the screen to the XY Coordinates.
Definition: Text.cpp:91