跳到主要内容

TextDrawBackgroundColor

描述

调整文本绘图区域的背景颜色(仅影响轮廓/阴影部分,盒子背景颜色需使用TextDrawBoxColor)。

参数说明
Text:textid要设置背景颜色的文本绘图 ID
backgroundColour目标背景颜色值(ARGB 格式)

返回值

本函数不返回特定值。

示例代码

new Text:gMyTextdraw;

public OnGameModeInit()
{
gMyTextdraw = TextDrawCreate(320.0, 425.0, "示例文本绘图");
TextDrawUseBox(gMyTextdraw, true);
TextDrawBackgroundColor(gMyTextdraw, 0xFFFFFFFF); // 将文本绘图背景设为白色
return 1;
}

注意事项

提示
提示

已显示的文本绘图修改后无需重建,使用TextDrawShowForPlayer/TextDrawShowForAll即可刷新显示

相关函数