YourCityInvadedByAliens
Documentation for code of the game
Public Member Functions | Private Attributes | List of all members
RenderAbsoluteTextBlock Class Reference

#include <render.h>

Inheritance diagram for RenderAbsoluteTextBlock:
Inheritance graph
[legend]
Collaboration diagram for RenderAbsoluteTextBlock:
Collaboration graph
[legend]

Public Member Functions

 RenderAbsoluteTextBlock (const CoordXY &p0, const std::string &sText, int nPositionZ=0)
 
virtual void modify (const GameState &state, IRenderWindow *pRenderWindow) override
 
virtual bool canDraw (const GameState &state) override
 
virtual void draw (SDL_Renderer *renderer) override
 
void updateText (const std::string &sNewText)
 
- Public Member Functions inherited from RenderObject
 RenderObject (int nPositionZ)
 
virtual ~RenderObject ()
 
int getPositionZ ()
 
bool isDestroyed ()
 
void destroy ()
 
int randomNoise ()
 

Private Attributes

CoordXY m_coordCenter
 
std::string m_sText
 
std::string m_sUpdateText
 
TTF_Font * m_pFont
 
SDL_Color m_color
 
SDL_Rect currentFrame
 

Additional Inherited Members

- Protected Attributes inherited from RenderObject
bool m_bDestroyed
 

Constructor & Destructor Documentation

◆ RenderAbsoluteTextBlock()

RenderAbsoluteTextBlock::RenderAbsoluteTextBlock ( const CoordXY p0,
const std::string &  sText,
int  nPositionZ = 0 
)

Member Function Documentation

◆ canDraw()

bool RenderAbsoluteTextBlock::canDraw ( const GameState state)
overridevirtual

Implements RenderObject.

◆ draw()

void RenderAbsoluteTextBlock::draw ( SDL_Renderer *  renderer)
overridevirtual

Implements RenderObject.

◆ modify()

void RenderAbsoluteTextBlock::modify ( const GameState state,
IRenderWindow pRenderWindow 
)
overridevirtual

Reimplemented from RenderObject.

◆ updateText()

void RenderAbsoluteTextBlock::updateText ( const std::string &  sNewText)

Member Data Documentation

◆ currentFrame

SDL_Rect RenderAbsoluteTextBlock::currentFrame
private

◆ m_color

SDL_Color RenderAbsoluteTextBlock::m_color
private

◆ m_coordCenter

CoordXY RenderAbsoluteTextBlock::m_coordCenter
private

◆ m_pFont

TTF_Font* RenderAbsoluteTextBlock::m_pFont
private

◆ m_sText

std::string RenderAbsoluteTextBlock::m_sText
private

◆ m_sUpdateText

std::string RenderAbsoluteTextBlock::m_sUpdateText
private

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