SetClrModulation

Category: Objects / Display
Since engine version: 1.0 OC

Description

Changes the color modulation of an object. This is a color value which is multiplied with the object color. RGB(255,0,0) will only let the red part of the color show. RGBa(255,255,255,128) will make all color half transparent.

Syntax

bool SetClrModulation(int color, int overlay_id);

Parameters

color:
Color value to be modulated with.
overlay_id:
[opt] If specified, sets the color modulation of the graphics overlay instead. The overlay must have been created using SetGraphics first.

Example

GetCursor()->SetClrModulation(RGBa(128,128,255,128));
Colors the selected clonk of the first player slightly blue and makes him half transparent.
See also: GetClrModulation, RGB, RGBa, SetColor, SetGamma, SetObjectBlitMode
Sven2, 2002-04