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:

SHOW

Makes the text visible on the screen.

TRANSLUCENT

The text is drawn transparent according to its alpha parameter.

FILTER

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

LIGHT

Bitmap fonts are modulated by the blue, green, red color parameters. A7.82  LC 

CENTER_X

Causes text to be horizontally centered around pos_x.

CENTER_Y

Causes bitmap and TTF text to be vertically centered around pos_y. A7.86

ARIGHT

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

WWRAP

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

REVERSE

Reverses Unicode text reading order from left-to-right to right-to-left, if the reading direction is not already supported in the Unicode font. A7.84  LC 

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.  C 

OUTLINE

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

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 |= SHOW;) and reset by and-ing the flags parameter with the inverse flag (text.flags &= ~SHOW;).

Example:

TEXT* welcome =
{
  ...
  flags = CENTER_X | TRANSLUCENT | SHOW;
}

See also:

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

► latest version online