Preskoči na vsebino

TextDrawBoxColour

opozorilo

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description​

Adjusts the text box colour (only used if TextDrawUseBox 'enableBox' parameter is 'true').

NameDescription
Text:textidThe TextDraw to change
boxColourThe colour. Opacity is set by the alpha intensity of colour (eg. colour 0x000000FF has a solid black box opacity, whereas 0x000000AA has a semi-transparent black box opacity).

Returns​

This function does not return any specific values.

Examples​

new Text:gMyTextdraw;

public OnGameModeInit()
{
gMyTextdraw = TextDrawCreate(123.0, 123.0, "Example");
TextDrawUseBox(gMyTextdraw, true);
TextDrawBoxColour(gMyTextdraw, 0xFFFFFFFF);
return 1;
}

Notes​

namig

If you want to change the boxcolour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible.