P-E-R-R-Y
Utilitaires, contrats et vendors du moteur, en une seule doc
Loading...
Searching...
No Matches
SfmlText Class Reference

Sfml Text class - references a SfmlFont, does not own it. Deleting the text never touches the font. More...

#include <SfmlText.hpp>

Inheritance diagram for SfmlText:
Collaboration diagram for SfmlText:

Public Member Functions

 SfmlText (std::string data, SfmlFont &font)
 ~SfmlText () override=default
bool isReady () const override
void setText (const std::string text) override
 Set the Text value.
std::string getText () const override
 Get the Text value.
void setFont (graphic::IFont *font) override
 Set the Font value - a loaded IFont, not a path, so changing font never implies a reload from disk.
void setFontSize (unsigned int size) override
 Set the Font Size text.
unsigned int getFontSize () const override
 Get the Font Size text.
void setTextColor (Color color) override
 Set the Text Color text.
Color getTextColor () const override
 Get the Text Color text.
void setPosition (Vector2f position) override
 Set the Position text.
Vector2f getPosition () const override
 Get the Position text.
void setRotation (float angle) override
 Set the Rotation object.
float getRotation () const override
 Get the Rotation object.
Public Member Functions inherited from graphic::IText
virtual ~IText ()=default
 Destroy the IText object.

Friends

class SfmlWindow

Detailed Description

Sfml Text class - references a SfmlFont, does not own it. Deleting the text never touches the font.

Constructor & Destructor Documentation

◆ SfmlText()

SfmlText::SfmlText ( std::string data,
SfmlFont & font )
inline

◆ ~SfmlText()

SfmlText::~SfmlText ( )
overridedefault

Member Function Documentation

◆ getFontSize()

unsigned int SfmlText::getFontSize ( ) const
inlineoverridevirtual

Get the Font Size text.

Returns
unsigned int

Implements graphic::IText.

◆ getPosition()

Vector2f SfmlText::getPosition ( ) const
inlineoverridevirtual

Get the Position text.

Returns
Vector2f

Implements graphic::IText.

◆ getRotation()

float SfmlText::getRotation ( ) const
inlineoverridevirtual

Get the Rotation object.

Returns
float

Implements graphic::IText.

◆ getText()

std::string SfmlText::getText ( ) const
inlineoverridevirtual

Get the Text value.

Returns
std::string

Implements graphic::IText.

◆ getTextColor()

Color SfmlText::getTextColor ( ) const
inlineoverridevirtual

Get the Text Color text.

Returns
Color

Implements graphic::IText.

◆ isReady()

bool SfmlText::isReady ( ) const
inlineoverridevirtual

Implements graphic::IText.

◆ setFont()

void SfmlText::setFont ( graphic::IFont * font)
inlineoverridevirtual

Set the Font value - a loaded IFont, not a path, so changing font never implies a reload from disk.

Parameters
font

Implements graphic::IText.

◆ setFontSize()

void SfmlText::setFontSize ( unsigned int size)
inlineoverridevirtual

Set the Font Size text.

Parameters
size

Implements graphic::IText.

◆ setPosition()

void SfmlText::setPosition ( Vector2f position)
inlineoverridevirtual

Set the Position text.

Parameters
position

Implements graphic::IText.

◆ setRotation()

void SfmlText::setRotation ( float angle)
inlineoverridevirtual

Set the Rotation object.

Parameters
angle

Implements graphic::IText.

◆ setText()

void SfmlText::setText ( const std::string text)
inlineoverridevirtual

Set the Text value.

Parameters
text

Implements graphic::IText.

◆ setTextColor()

void SfmlText::setTextColor ( Color color)
inlineoverridevirtual

Set the Text Color text.

Parameters
color

Implements graphic::IText.

◆ SfmlWindow

friend class SfmlWindow
friend

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