Creates a Text sprite for use with using the Text formating.
More...
#include <Text.h>
|
| | Text (std::string text, std::string fontLocation) |
| | Constructs the Text Texture. Font size and colour will be default (size 10 and black). More...
|
| |
| | Text (std::string text, std::string fontLocation, int fontSize) |
| | Constructs the Text Texture. Font colour will be default (black). More...
|
| |
| | Text (std::string text, std::string fontLocation, int r, int g, int b) |
| | Constructs the Text Texture. Font size will be default (size 10). More...
|
| |
| | Text (std::string text, std::string fontLocation, SDL_Colour fontColour) |
| | Constructs the Text Texture. Font size will be default (size 10). More...
|
| |
| | Text (std::string text, std::string fontLocation, int fontSize, int r, int g, int b) |
| | Constructs the Text Texture. More...
|
| |
| | Text (std::string text, std::string fontLocation, int fontSize, SDL_Colour fontColour) |
| | Constructs the Text Texture. More...
|
| |
| | ~Text () |
| | Destructs the Text Texture. More...
|
| |
| void | pushToScreen (Vec2 pos) |
| | Pushes the Text Texture to the screen to the XY Coordinates. More...
|
| |
| void | setColour (int r, int g, int b) |
| | Sets the colour of the text. More...
|
| |
| void | setColour (SDL_Colour colour) |
| | Sets the colour of the text. More...
|
| |
| void | setFontSize (int inSize) |
| | Sets the font size of the text. More...
|
| |
| void | setFont (std::string inFontLocation) |
| | Sets the font of the text. More...
|
| |
| void | setText (std::string inText) |
| | Sets the text. More...
|
| |
| Vec2 | getDimensions () |
| | Gets the dimensions of the Text Texture. More...
|
| |
Creates a Text sprite for use with using the Text formating.
◆ Text() [1/6]
| Text::Text |
( |
std::string |
text, |
|
|
std::string |
fontLocation |
|
) |
| |
Constructs the Text Texture. Font size and colour will be default (size 10 and black).
- Parameters
-
| text | The text to display. |
| fontLocation | The location of the font file. |
◆ Text() [2/6]
| Text::Text |
( |
std::string |
text, |
|
|
std::string |
fontLocation, |
|
|
int |
fontSize |
|
) |
| |
Constructs the Text Texture. Font colour will be default (black).
- Parameters
-
| text | The text to display. |
| fontLocation | The location of the font file. |
| fontSize | The size of the font. |
◆ Text() [3/6]
| Text::Text |
( |
std::string |
text, |
|
|
std::string |
fontLocation, |
|
|
int |
r, |
|
|
int |
g, |
|
|
int |
b |
|
) |
| |
Constructs the Text Texture. Font size will be default (size 10).
- Parameters
-
| text | The text to display. |
| fontLocation | The location of the font file. |
| r | The value of red. (0-255) |
| g | The value of green. (0-255) |
| b | The value of blue. (0-255) |
◆ Text() [4/6]
| Text::Text |
( |
std::string |
text, |
|
|
std::string |
fontLocation, |
|
|
SDL_Colour |
fontColour |
|
) |
| |
Constructs the Text Texture. Font size will be default (size 10).
- Parameters
-
| text | The text to display. |
| fontLocation | The location of the font file. |
| fontColour | The colour of the font. |
◆ Text() [5/6]
| Text::Text |
( |
std::string |
text, |
|
|
std::string |
fontLocation, |
|
|
int |
fontSize, |
|
|
int |
r, |
|
|
int |
g, |
|
|
int |
b |
|
) |
| |
Constructs the Text Texture.
- Parameters
-
| text | The text to display. |
| fontLocation | The location of the font file. |
| fontSize | The size of the font. |
| r | The value of red. (0-255) |
| g | The value of green. (0-255) |
| b | The value of blue. (0-255) |
◆ Text() [6/6]
| Text::Text |
( |
std::string |
text, |
|
|
std::string |
fontLocation, |
|
|
int |
fontSize, |
|
|
SDL_Colour |
fontColour |
|
) |
| |
Constructs the Text Texture.
- Parameters
-
| text | The text to display. |
| fontLocation | The location of the font file. |
| fontSize | The size of the font. |
| fontColour | The colour of the font. |
◆ ~Text()
Destructs the Text Texture.
◆ createTextTexture()
| void Text::createTextTexture |
( |
| ) |
|
|
private |
Creates a Text Texture using the Text data.
◆ getDimensions()
| Vec2 Text::getDimensions |
( |
| ) |
|
Gets the dimensions of the Text Texture.
- Returns
- The dimensions of the Text Texture.
◆ pushToScreen()
| void Text::pushToScreen |
( |
Vec2 |
pos | ) |
|
Pushes the Text Texture to the screen to the XY Coordinates.
- Parameters
-
| pos | The position to push the Text Texture to. |
◆ setColour() [1/2]
| void Text::setColour |
( |
int |
r, |
|
|
int |
g, |
|
|
int |
b |
|
) |
| |
Sets the colour of the text.
- Parameters
-
| r | The value of red. (0-255) |
| g | The value of green. (0-255) |
| b | The value of blue. (0-255) |
◆ setColour() [2/2]
| void Text::setColour |
( |
SDL_Colour |
colour | ) |
|
Sets the colour of the text.
- Parameters
-
| colour | The colour of the font. |
◆ setFont()
| void Text::setFont |
( |
std::string |
inFontLocation | ) |
|
Sets the font of the text.
- Parameters
-
| inFontLocation | The location of the font file. |
◆ setFontSize()
| void Text::setFontSize |
( |
int |
inSize | ) |
|
Sets the font size of the text.
- Parameters
-
| inSize | The font size of the text. |
◆ setText()
| void Text::setText |
( |
std::string |
inText | ) |
|
Sets the text.
- Parameters
-
| inText | The text to display. |
◆ dimensions
◆ font
◆ fontColour
| SDL_Colour Text::fontColour |
|
private |
◆ fontLocation
| std::string Text::fontLocation |
|
private |
◆ fontSize
◆ surfaceData
◆ text
The text and font location.
The documentation for this class was generated from the following files:
- LevelHEngine/ResourceManagement/Text.h
- LevelHEngine/ResourceManagement/Text.cpp