flags

Set of 'switches' to be set in a panel definition, separated by " | ". Individual flags can also be set or reset at runtime. All flags are reset by default. The panel elements - buttons, digits and so on - 'inherit' the flags from the panel. The following flags are supported:

SHOW

Makes the object visible on the screen.

OVERLAY

The background color (normally black) of the panel image will become transparent, and all parts above 50% transparency will be clipped away so that the panel appears as an overlay. The transparency tolerance can be adjusted through d3d_alpharef.  !!  This flag should only be used when the panel bitmap has no own alpha channel. Otherwise, the transparent parts of the bitmap are defined by the alpha channel.

TRANSLUCENT

The panel gets uniform transparency according to its alpha parameter.

FILTER

The panel's fonts and images will be filtered by 'blurring' single pixels. This won't look good for small fonts, but can improve the look of huge fonts or scaled images.

LIGHT

The panel's image and elements are modulated by the it's blue, green, red color parameters.

CENTER_X

The panel's digits elements are horizontally centered around their x position. A7.10  LC 

CENTER_Y

The panel's digits elements are vertically centered around their y position when they use bitmap fonts. A7.10  LC 

SHADOW

Draws TTF digits fonts with a black shadow, adjustable through the alpha and text_outline parameters. A7.71C  LC 

OUTLINE

Draws TTF digits fonts with a black outline around the characters, adjustable through the alpha and text_outline parameters. A7.71C  LC 

UNTOUCHABLE

The panel is transparent to mouse clicks. Mouse events are not triggered.  A7.82   LC 

 

Remarks:

In C-Script, a flag is set or reset at runtime by assigning the ON or OFF value (like panel.SHOW = ON;). In C, C++, or Lite-C, a flag is set by or-ing the flags parameter with the flag (panel.flags |= SHOW;) and reset by and-ing the flags parameter with the inverse flag (panel.flags &= ~SHOW;). The predefined macros set, reset, and toggle can also be used for manipulating individual flags.

Example:

PANEL* aircraft_pan =
{
 	bmap = "compass.pcx";
 	flags = SHOW | OVERLAY; 			
}

...
reset(aircraft_pan,SHOW);
...

See also:

PANEL, bmap, layer, pos_x

► latest version online