TextChatMessageProperties

显示已弃用

*此内容使用人工智能(Beta)翻译,可能包含错误。若要查看英文页面,请点按 此处

TextChatMessageTextChatService.OnIncomingMessageTextChannel.OnIncomingMessage 中定义的回调返回时覆盖属性 或 。这可用于自定义具有 富文本标签 的消息的外观。


local TextChatService = game:GetService("TextChatService")
TextChatService.OnIncomingMessage = function(message: TextChatMessage)
-- 派生聊天消息属性
local properties = TextChatService.ChatWindowConfiguration:DeriveNewMessageProperties()
-- 更改消信息的颜色
properties.TextColor3 = Color3.fromRGB(255, 121, 121)
-- 设置聊天窗口消息属性
message.ChatWindowMessageProperties = properties
return properties
end

属性

PrefixText

读取并联

需要覆盖的 TextChatMessage.PrefixText

Text

读取并联

需要覆盖的 TextChatMessage.Text

Translation

读取并联

需要覆盖的 TextChatMessage.Translation 代表 自动翻译 和基于玩家本地化设置过滤的文本消息。

方法

活动