#include <text.h>
|
| | 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.
|
| |
| virtual void | draw (gcn::Graphics *graphics, int xOff, int yOff) |
| | Draws the text.
|
| |
|
| 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.
|
| |
| gcn::Font * | mFont |
| | The font of the text.
|
| |
| bool | mIsSpeech |
| | Is this text a speech bubble?
|
| |
Definition at line 33 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 35 of file text.cpp.
◆ ~Text()
Destructor.
The text is removed from the screen.
Definition at line 74 of file text.cpp.
◆ adviseXY()
| void Text::adviseXY |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Allows the originator of the text to specify the ideal coordinates.
Definition at line 89 of file text.cpp.
◆ draw()
| void Text::draw |
( |
gcn::Graphics * |
graphics, |
|
|
int |
xOff, |
|
|
int |
yOff |
|
) |
| |
|
virtual |
◆ getHeight()
| int Text::getHeight |
( |
| ) |
const |
|
inline |
◆ getWidth()
| int Text::getWidth |
( |
| ) |
const |
|
inline |
◆ setColor()
| void Text::setColor |
( |
const gcn::Color * |
color | ) |
|
◆ TextManager
◆ mColor
| const gcn::Color* Text::mColor |
|
private |
The color of the text.
Definition at line 74 of file text.h.
◆ mFont
The font of the text.
Definition at line 75 of file text.h.
◆ mHeight
The height of the text.
Definition at line 70 of file text.h.
◆ mInstances
Instances of text.
Definition at line 72 of file text.h.
◆ mIsSpeech
Is this text a speech bubble?
Definition at line 76 of file text.h.
◆ mText
The text to display.
Definition at line 73 of file text.h.
◆ mWidth
The width of the text.
Definition at line 69 of file text.h.
◆ mX
Actual x-value of left of text written.
Definition at line 67 of file text.h.
◆ mXOffset
The offset of mX from the desired x.
Definition at line 71 of file text.h.
◆ mY
Actual y-value of top of text written.
Definition at line 68 of file text.h.
The documentation for this class was generated from the following files: