SDL SPOOKY PLATFORMER ENGINE
0.2.0
An implementation of a platformer using sdl, implemented using an entity component system and efficient collision management.
|
#include <BasicTextComponent.hpp>
Public Member Functions | |
BasicTextComponent (SDL_Point position, SDL_Renderer *renderer, std::shared_ptr< TTF_Font > font, SDL_Color &color, TextUpdate *updateFunc) | |
~BasicTextComponent () | |
clean up a text object More... | |
void | SetText (const std::wstring &text) |
void | Render (SDL_Renderer *ren) |
SDL_Rect | TextDims () |
void | Update (float deltaTime) |
Update this component according to the deltaTime. More... | |
BasicTextComponent (BasicTextComponent &text) = delete | |
don't allow accidental copies which may create unfortunate references. More... | |
![]() | |
Component () | |
virtual | ~Component () |
Additional Inherited Members | |
![]() | |
GameObject * | entity |
The entitity to which this component belongs to. More... | |
Basic implementation of general text objects. Once created a text object is fixed in place, however the actual text it renders can change.
BasicTextComponent::BasicTextComponent | ( | SDL_Point | position, |
SDL_Renderer * | renderer, | ||
std::shared_ptr< TTF_Font > | font, | ||
SDL_Color & | color, | ||
TextUpdate * | updateFunc | ||
) |
Constructs a text object.
position | where its anchor point is |
renderer | renderer to target when drawing |
font | what font to draw it in |
color | what color to draw it in |
BasicTextComponent::~BasicTextComponent | ( | ) |
clean up a text object
|
delete |
don't allow accidental copies which may create unfortunate references.
|
virtual |
void BasicTextComponent::SetText | ( | const std::wstring & | text | ) |
Set the text to render.
text | string to render |
SDL_Rect BasicTextComponent::TextDims | ( | ) |
Return the dimensions of this text object.
|
virtual |