R-Type
Public Member Functions | List of all members
GameEngine::Text Class Reference

Class representing a text wrapper for sf::Text with basic functionality. More...

#include <SfmlTypes.hpp>

Public Member Functions

 Text ()
 Default constructor for Text. More...
 
 ~Text ()=default
 Destructor for Text. More...
 
const sf::Text & getText () const
 Returns the wrapped sf::Text. More...
 
void load (const std::string &text, const sf::Font &font, size_t size)
 Loads text with specified font and size. More...
 
void setPosition (const Vector2< float > &position)
 
void setString (const std::string &string)
 
Rectf getLocalBounds () const
 

Detailed Description

Class representing a text wrapper for sf::Text with basic functionality.

Constructor & Destructor Documentation

◆ Text()

GameEngine::Text::Text ( )
inline

Default constructor for Text.

◆ ~Text()

GameEngine::Text::~Text ( )
default

Destructor for Text.

Member Function Documentation

◆ getLocalBounds()

Rectf GameEngine::Text::getLocalBounds ( ) const
inline

◆ getText()

const sf::Text& GameEngine::Text::getText ( ) const
inline

Returns the wrapped sf::Text.

Returns
Reference to the sf::Text instance

◆ load()

void GameEngine::Text::load ( const std::string &  text,
const sf::Font &  font,
size_t  size 
)
inline

Loads text with specified font and size.

Parameters
textThe string to set for the text
fontThe font to apply to the text
sizeThe character size of the text

◆ setPosition()

void GameEngine::Text::setPosition ( const Vector2< float > &  position)
inline

◆ setString()

void GameEngine::Text::setString ( const std::string &  string)
inline

The documentation for this class was generated from the following file: