BitmapTextRuntimeObject

BitmapTextRuntimeObject

Displays a text using a "Bitmap Font", generated in a external editor like bmFont. This is more efficient/faster to render than a traditional text (which needs to have its whole texture re-rendered anytime it changes).

Bitmap Font can be created with softwares like:

  • BMFont (Windows, free): http://www.angelcode.com/products/bmfont/|http://www.angelcode.com/products/bmfont/
  • Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner|http://www.71squared.com/en/glyphdesigner
  • Littera (Web-based, free): http://kvazars.com/littera/|http://kvazars.com/littera/

Constructor

new BitmapTextRuntimeObject(runtimeScene, objectData)

Parameters:
Name Type Description
runtimeScene

The scene the object belongs to.

objectData

The object data used to initialize the object

Source:

Methods

extraInitializationFromInitialInstance()

Initialize the extra parameters that could be set for an instance.

Source:

getHeight()

Get the height of the object.

Source:

getOpacity()

Get object opacity.

Source:

getText()

Get the text displayed by the object.

Source:

getWidth()

Get the width of the object.

Source:

getWrappingWidth()

Get the wrapping width of the object.

Source:

setAngle(angle)

Set the angle of the object.

Parameters:
Name Type Description
angle

The new angle of the object.

Source:

setOpacity(opacity)

Set object opacity.

Parameters:
Name Type Description
opacity

The new opacity of the object (0-255).

Source:

setText()

Set the text to display.

Source:

setWrappingWidth(width)

Set the wrapping width.

Parameters:
Name Type Description
width

The new width in pixels.

Source:

setX(x)

Set object position on X axis.

Parameters:
Name Type Description
x

The new position X of the object.

Source:

setY(y)

Set object position on Y axis.

Parameters:
Name Type Description
y

The new position Y of the object.

Source: