#include <Text.hpp>
◆ Text() [1/3]
ECS::Text::Text |
( |
sf::Font & |
font, |
|
|
const std::string & |
sentence, |
|
|
int |
size, |
|
|
sf::Vector2f |
pos |
|
) |
| |
|
explicitnoexcept |
It initializes the text object
- Parameters
-
font | The font that the text will use. |
sentence | The text you want to display |
size | The size of the text. |
pos | The position of the text |
◆ Text() [2/3]
ECS::Text::Text |
( |
const Text & |
text | ) |
|
|
noexcept |
It's a copy constructor
- Parameters
-
◆ Text() [3/3]
ECS::Text::Text |
( |
Text && |
| ) |
|
|
explicitdeletenoexcept |
◆ ~Text()
◆ getFont()
sf::Font ECS::Text::getFont |
( |
| ) |
const |
|
noexcept |
Returns the font of the text.
- Returns
- A reference to the font.
◆ getPosition()
sf::Vector2f ECS::Text::getPosition |
( |
| ) |
const |
|
noexcept |
Returns the position of the text.
- Returns
- The position of the text.
◆ getSentence()
std::string ECS::Text::getSentence |
( |
| ) |
const |
|
noexcept |
It returns the sentence.
- Returns
- The sentence.
◆ getText()
sf::Text & ECS::Text::getText |
( |
| ) |
|
|
noexcept |
It returns the text object.
- Returns
- A reference to the text object.
◆ getTextSize()
int ECS::Text::getTextSize |
( |
| ) |
const |
|
noexcept |
It returns the size of the text.
- Returns
- The text size.
◆ operator=() [1/2]
Text& ECS::Text::operator= |
( |
const Text & |
| ) |
const |
|
deletenoexcept |
◆ operator=() [2/2]
Text& ECS::Text::operator= |
( |
Text && |
| ) |
const |
|
deletenoexcept |
◆ setFont()
void ECS::Text::setFont |
( |
sf::Font & |
font | ) |
|
|
noexcept |
It sets the font of the text object
- Parameters
-
font | The font to use for the text. |
◆ setPosition() [1/2]
void ECS::Text::setPosition |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
noexcept |
It sets the position of the text object
- Parameters
-
x | The x position of the text. |
y | The y position of the text. |
◆ setPosition() [2/2]
void ECS::Text::setPosition |
( |
sf::Vector2f |
pos | ) |
|
|
noexcept |
It sets the position of the text object
- Parameters
-
pos | The position of the text. |
◆ setSentence()
void ECS::Text::setSentence |
( |
const std::string & |
sentence | ) |
|
|
noexcept |
It sets the sentence of the text
- Parameters
-
sentence | The string to be displayed. |
◆ setSizeText()
void ECS::Text::setSizeText |
( |
int |
size | ) |
|
|
noexcept |
It sets the size of the text
- Parameters
-
size | The size of the text. |
The documentation for this class was generated from the following files: