Polycode
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 StringgetText () 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:
fontNameName of a registered font to use.
See also:
FontManager for info on how to register fonts.
Parameters:
textText to display.
sizeSize in pixels.
Anti-aliasingmode.

Member Function Documentation

void ScreenLabel::addDropShadow ( Color  color,
Number  size,
Number  offsetX,
Number  offsetY 
)

Adds a drop shadow to the label.

Parameters:
colorColor of the drop shadow.
sizeSize of the drop shadow in pixels.
offsetXHorizontal offset of the drop shadow.
offsetYVertical 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:
newTextText to set.