Text Class Reference
#include <text.h>
List of all members.
Detailed Description
Definition at line 33 of file text.h.
|
Public Member Functions |
| Text (const std::string &text, int x, int y, gcn::Graphics::Alignment alignment, const gcn::Color *color, bool isSpeech=false) |
| 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.
|
virtual void | draw (gcn::Graphics *graphics, int xOff, int yOff) |
| Draws the text.
|
Static Protected Attributes |
static ImageRect | mBubble |
| Speech bubble graphic.
|
static Image * | mBubbleArrow |
| Speech bubble arrow graphic.
|
Private Attributes |
int | mX |
| Actual x-value of left of text written.
|
int | mY |
| Actual y-value of top of text written.
|
int | mWidth |
| The width of the text.
|
int | mHeight |
| The height of the text.
|
int | mXOffset |
| The offset of mX from the desired x.
|
std::string | mText |
| The text to display.
|
const gcn::Color * | mColor |
| The color of the text.
|
bool | mIsSpeech |
| Is this text a speech bubble?
|
Static Private Attributes |
static int | mInstances = 0 |
| Instances of text.
|
Friends |
class | TextManager |
Constructor & Destructor Documentation
Text::Text |
( |
const std::string & |
text, |
|
|
int |
x, |
|
|
int |
y, |
|
|
gcn::Graphics::Alignment |
alignment, |
|
|
const gcn::Color * |
color, |
|
|
bool |
isSpeech = false | |
|
) |
| | |
Constructor creates a text object to display on the screen.
Definition at line 40 of file text.cpp.
Text::~Text |
( |
|
) |
[virtual] |
Destructor.
The text is removed from the screen.
Definition at line 92 of file text.cpp.
Member Function Documentation
void Text::setColor |
( |
const gcn::Color * |
color |
) |
|
int Text::getWidth |
( |
void |
|
) |
const [inline] |
int Text::getHeight |
( |
void |
|
) |
const [inline] |
void Text::adviseXY |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | |
Allows the originator of the text to specify the ideal coordinates.
Definition at line 117 of file text.cpp.
void Text::draw |
( |
gcn::Graphics * |
graphics, |
|
|
int |
xOff, |
|
|
int |
yOff | |
|
) |
| | [virtual] |
Friends And Related Function Documentation
Member Data Documentation
Actual x-value of left of text written.
Definition at line 66 of file text.h.
Actual y-value of top of text written.
Definition at line 67 of file text.h.
The width of the text.
Definition at line 68 of file text.h.
The height of the text.
Definition at line 69 of file text.h.
The offset of mX from the desired x.
Definition at line 70 of file text.h.
Instances of text.
Definition at line 71 of file text.h.
The text to display.
Definition at line 72 of file text.h.
The color of the text.
Definition at line 73 of file text.h.
Is this text a speech bubble?
Definition at line 74 of file text.h.
Speech bubble graphic.
Definition at line 77 of file text.h.
Speech bubble arrow graphic.
Definition at line 78 of file text.h.
The documentation for this class was generated from the following files: