Polycode::ScreenLabel Class Reference
2D screen label display.
More...
Inherits Polycode::ScreenShape.
List of all members.
Public Member Functions |
| ScreenLabel (const String &text, int size, const String &fontName="sans", int amode=0) |
| Constructor.
|
void | addDropShadow (Color color, Number size, Number offsetX, Number offsetY) |
| Adds a drop shadow to the label.
|
void | setText (const String &newText) |
| Sets a new text to the screen label.
|
const String & | getText () const |
| Returns the label's text as a string.
|
Detailed Description
2D screen label display.
Displays 2d text in a specified font.
Constructor & Destructor Documentation
ScreenLabel::ScreenLabel |
( |
const String & |
text, |
|
|
int |
size, |
|
|
const String & |
fontName = "sans" , |
|
|
int |
amode = 0 | |
|
) |
| | |
Constructor.
- Parameters:
-
| fontName | Name of a registered font to use. |
- See also:
- FontManager for info on how to register fonts.
- Parameters:
-
| text | Text to display. |
| size | Size in pixels. |
| Anti-aliasing | mode. |
Member Function Documentation
void ScreenLabel::addDropShadow |
( |
Color |
color, |
|
|
Number |
size, |
|
|
Number |
offsetX, |
|
|
Number |
offsetY | |
|
) |
| | |
Adds a drop shadow to the label.
- Parameters:
-
| color | Color of the drop shadow. |
| size | Size of the drop shadow in pixels. |
| offsetX | Horizontal offset of the drop shadow. |
| offsetY | Vertical offset of the drop shadow. |
const String & ScreenLabel::getText |
( |
|
) |
const |
Returns the label's text as a string.
- Returns:
- The label's text.
void ScreenLabel::setText |
( |
const String & |
newText |
) |
|
Sets a new text to the screen label.
- Parameters:
-