flags

Set of 'switches' to be set at game start, separated by " | ". All other flags are reset by default. The following flags may be set:

Parameters:

VISIBLE

Makes the text visible on the screen.

TRANSLUCENT

The text is drawn transparent according to its alpha parameter.

FILTER

Bitmap text will be filtered by 'blurring' single pixels. This won't look good for small fonts, but can improve the look of huge fonts of scaled texts.

CENTER_X

Causes text to be horizontally centered around pos_x.

CENTER_Y

Causes bitmap text to be vertically centered around pos_y.

ARIGHT

A7.3  LC  Causes text to be right aligned at pos_x.

WWRAP

A7.3  LC  Activates word wrap for TTF texts. Words are moved to the next line when they don't fit into the text width (size_x).

CONDENSED

Causes bitmap text to be 'compressed' horizontally by 1 pixel per character.

SHADOW

Draws TTF texts with a black shadow, adjustable through the alpha and text_outline parameters.

OUTLINE

Draws TTF texts with a black outline around the characters, adjustable through the alpha and text_outline parameters.

Remarks:

In C-Script, a flag is set or reset during gameplay by assigning the on or off value (like text.visible = on;). In C, C++, or Lite-C, a flag is set by or-ing the flags parameter with the flag (text.flags |= VISIBLE;) and reset by and-ing the flags parameter with the inverse flag (text.flags &= ~VISIBLE;).

Example:

TEXT* welcome =
{
  ...
  flags = CENTER_X | NARROW | TRANSPARENT | VISIBLE;
}

See also:

TEXT, layer, pos_x,, size_y, offset_y, strings, font, pstring, alpha

► latest version online