TmxText

format.tmx.TmxText (Class)

Used to mark an object as a text object. Contains the actual text as character data.

Instance Members

fontFamily: String

The font family used (default: “sans-serif”)


pixelSize: Int

The size of the font in pixels (not using points, because other sizes in the TMX format are also using pixels) (default: 16)


wrap: Bool

Whether word wrapping is enabled (1) or disabled (0). Defaults to 0.


color: Int

Color of the text in #AARRGGBB or #RRGGBB format (default: #000000)


bold: Bool

Whether the font is bold (1) or not (0). Defaults to 0.


italic: Bool

Whether the font is italic (1) or not (0). Defaults to 0.


underline: Bool

Whether a line should be drawn below the text (1) or not (0). Defaults to 0.


strikeout: Bool

Whether a line should be drawn through the text (1) or not (0). Defaults to 0.


kerning: Bool

Whether kerning should be used while rendering the text (1) or not (0). Default to 1.


halign: TmxHAlign

Horizontal alignment of the text within the object (left (default), center, right or justify (since Tiled 1.2.1))


valign: TmxVAlign

Vertical alignment of the text within the object (top (default), center or bottom)


text: String

Actual text of object


new(fontFamily: String, pixelSize: Int, wrap: Bool, color: Int, bold: Bool, italic: Bool, underline: Bool, strikeout: Bool, kerning: Bool, halign: TmxHAlign, valign: TmxVAlign, text: String): Void
Name Type Description
fontFamily String The font family used (default: “sans-serif”)
pixelSize Int The size of the font in pixels (not using points, because other sizes in the TMX format are also using pixels) (default: 16)
wrap Bool Whether word wrapping is enabled (1) or disabled (0). Defaults to 0.
color Int Color of the text in #AARRGGBB or #RRGGBB format (default: #000000)
bold Bool Whether the font is bold (1) or not (0). Defaults to 0.
italic Bool Whether the font is italic (1) or not (0). Defaults to 0.
underline Bool Whether a line should be drawn below the text (1) or not (0). Defaults to 0.
strikeout Bool Whether a line should be drawn through the text (1) or not (0). Defaults to 0.
kerning Bool Whether kerning should be used while rendering the text (1) or not (0). Default to 1.
halign TmxHAlign Horizontal alignment of the text within the object (left (default), center, right or justify (since Tiled 1.2.1))
valign TmxVAlign Vertical alignment of the text within the object (top (default), center or bottom)
text String Actual text of object

Metadata

Name Parameters
:structInit -