SDL Breakout Engine  0.1.0
An implementation of a Breakout game using sdl, implemented with efficient resource management.
Public Member Functions | List of all members
BasicText Class Reference

#include <BasicText.hpp>

Public Member Functions

 BasicText (SDL_Point position, SDL_Renderer *renderer, std::shared_ptr< TTF_Font > font, SDL_Color &color)
 
 ~BasicText ()
 clean up a text object More...
 
void SetText (const std::wstring &text)
 
void Draw ()
 
SDL_Rect TextDims ()
 
 BasicText (BasicText &text) = delete
 don't allow accidental copies which may create unfortunate references. More...
 

Detailed Description

Basic implementation of general text objects. Once created a text object is fixed in place, however the actual text it renders can change.

Constructor & Destructor Documentation

BasicText::BasicText ( SDL_Point  position,
SDL_Renderer *  renderer,
std::shared_ptr< TTF_Font >  font,
SDL_Color &  color 
)

Constructs a text object.

Parameters
positionwhere its anchor point is
rendererrenderer to target when drawing
fontwhat font to draw it in
colorwhat color to draw it in
BasicText::~BasicText ( )

clean up a text object

BasicText::BasicText ( BasicText &  text)
delete

don't allow accidental copies which may create unfortunate references.

Member Function Documentation

void BasicText::Draw ( )

Render text to screen.

void BasicText::SetText ( const std::wstring &  text)

Set the text to render.

Parameters
textstring to render
SDL_Rect BasicText::TextDims ( )

Return the dimensions of this text object.


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