Mana
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
FlashText Class Reference

#include <text.h>

Inheritance diagram for FlashText:
Text

Public Member Functions

void flash (int time)
 Flash the text for so many milliseconds.
 
void draw (gcn::Graphics *graphics, int xOff, int yOff) override
 Draws the text.
 
 Text (const std::string &text, int x, int y, gcn::Graphics::Alignment alignment, const gcn::Color *color, bool isSpeech=false, gcn::Font *font=nullptr)
 Constructor creates a text object to display on the screen.
 
- Public Member Functions inherited from Text
 Text (const std::string &text, int x, int y, gcn::Graphics::Alignment alignment, const gcn::Color *color, bool isSpeech=false, gcn::Font *font=nullptr)
 Constructor creates a text object to display on the screen.
 
virtual ~Text ()
 Destructor.
 
void setColor (const gcn::Color *color)
 
int getWidth () const
 
int getHeight () const
 
void adviseXY (int x, int y)
 Allows the originator of the text to specify the ideal coordinates.
 

Private Attributes

Timer mTimer
 Time left for flashing.
 

Detailed Description

Definition at line 79 of file text.h.

Member Function Documentation

◆ draw()

void FlashText::draw ( gcn::Graphics *  graphics,
int  xOff,
int  yOff 
)
overridevirtual

Draws the text.

Reimplemented from Text.

Definition at line 124 of file text.cpp.

◆ flash()

void FlashText::flash ( int  time)
inline

Flash the text for so many milliseconds.

Definition at line 87 of file text.h.

◆ Text()

Text::Text ( const std::string &  text,
int  x,
int  y,
gcn::Graphics::Alignment  alignment,
const gcn::Color *  color,
bool  isSpeech = false,
gcn::Font *  font = nullptr 
)

Constructor creates a text object to display on the screen.

Definition at line 41 of file text.cpp.

Member Data Documentation

◆ mTimer

Timer FlashText::mTimer
private

Time left for flashing.

Definition at line 95 of file text.h.


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