Aprenda
Classe do mecanismo
ChatInputBarConfiguration
Não criável

*Este conteúdo é traduzido por IA (Beta) e pode conter erros. Para ver a página em inglês, clique aqui.


Amostras de código
Obter Limites Totais da UI do Chat
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local windowConfig = TextChatService.ChatWindowConfiguration
local inputBarConfig = TextChatService.ChatInputBarConfiguration
local function getTotalChatBounds()
local windowPos = windowConfig.AbsolutePosition
local windowSize = windowConfig.AbsoluteSize
local inputPos = inputBarConfig.AbsolutePosition
local inputSize = inputBarConfig.AbsoluteSize
-- Compute the union of both rectangles to get total chat UI bounds.
-- Os valores reportados não incluem o chanfro decorativo na parte superior
-- e nas bordas inferiores da janela do chat.
local topLeft = Vector2.new(
math.min(windowPos.X, inputPos.X),
math.min(windowPos.Y, inputPos.Y)
)
local bottomRight = Vector2.new(
math.max(windowPos.X + windowSize.X, inputPos.X + inputSize.X),
math.max(windowPos.Y + windowSize.Y, inputPos.Y + inputSize.Y)
)
return topLeft, bottomRight - topLeft
end
-- Wait for chat UI to initialize and report absolute values
task.wait(2)
local position, size = getTotalChatBounds()
print("Posição total da UI do chat:", position)
print("Tamanho total da UI do chat:", size)
-- Overlay a semi-transparent frame to visually verify the bounds
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "ChatBoundsDebug"
screenGui.DisplayOrder = 100
screenGui.Parent = playerGui
local frame = Instance.new("Frame")
frame.Position = UDim2.fromOffset(position.X, position.Y)
frame.Size = UDim2.fromOffset(size.X, size.Y)
frame.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
frame.BackgroundTransparency = 0.5
frame.BorderSizePixel = 2
frame.BorderColor3 = Color3.fromRGB(255, 0, 0)
frame.Parent = screenGui

Referência API
Propriedades
AbsolutePosition
Somente leitura
Não replicado
Recursos: Chat
ChatInputBarConfiguration.AbsolutePosition:Vector2

AbsoluteSize
Somente leitura
Não replicado
Recursos: Chat
ChatInputBarConfiguration.AbsoluteSize:Vector2

AutocompleteEnabled
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.AutocompleteEnabled:boolean

BackgroundColor3
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.BackgroundColor3:Color3

BackgroundTransparency
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.BackgroundTransparency:number

Enabled
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.Enabled:boolean

FontFace
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.FontFace:Font

IsFocused
Somente leitura
Não replicado
Recursos: Chat
ChatInputBarConfiguration.IsFocused:boolean
Amostras de código
Indicador de Digitação
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")
local ChatInputBarConfiguration = TextChatService:FindFirstChildOfClass("ChatInputBarConfiguration")
local BubbleChatConfiguration = TextChatService:FindFirstChildOfClass("BubbleChatConfiguration")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
-- Configurar TextLabel
local textLabel = Instance.new("TextLabel")
textLabel.Size = UDim2.fromScale(1, 1)
textLabel.Text = ". . ."
textLabel.BackgroundColor3 = BubbleChatConfiguration.BackgroundColor3
textLabel.BorderColor3 = BubbleChatConfiguration.BackgroundColor3
textLabel.BackgroundTransparency = BubbleChatConfiguration.BackgroundTransparency
textLabel.TextColor3 = BubbleChatConfiguration.TextColor3
textLabel.FontFace = BubbleChatConfiguration.FontFace
textLabel.TextSize = BubbleChatConfiguration.TextSize
-- Adicionar um UICorner ao TextLabel para ter cantos arredondados
local uiCorner = Instance.new("UICorner")
uiCorner.CornerRadius = UDim.new(0, 12)
uiCorner.Parent = textLabel
-- Configurar Billboard
local typingIndicatorBillboard = Instance.new("BillboardGui")
typingIndicatorBillboard.Enabled = false
typingIndicatorBillboard.Size = UDim2.fromScale(1, 1)
typingIndicatorBillboard.StudsOffsetWorldSpace = Vector3.new(-0, 4, 0)
typingIndicatorBillboard.Adornee = Character
textLabel.Parent = typingIndicatorBillboard
typingIndicatorBillboard.Parent = LocalPlayer:FindFirstChildOfClass("PlayerGui")
ChatInputBarConfiguration:GetPropertyChangedSignal("IsFocused"):Connect(function()
-- Ativar o indicador de digitação quando a barra de entrada estiver focada e desativar caso contrário
typingIndicatorBillboard.Enabled = ChatInputBarConfiguration.IsFocused
end)

KeyboardKeyCode
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.KeyboardKeyCode:Enum.KeyCode

PlaceholderColor3
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.PlaceholderColor3:Color3

TargetTextChannel
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.TargetTextChannel:TextChannel

TextBox
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.TextBox:TextBox

TextColor3
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.TextColor3:Color3

TextSize
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.TextSize:number

TextStrokeColor3
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.TextStrokeColor3:Color3

TextStrokeTransparency
Ler Parallel
Recursos: Chat
ChatInputBarConfiguration.TextStrokeTransparency:number

©2026 Roblox Corporation, Roblox, o logotipo Roblox e Powering Imagination estão entre nossas marcas registradas e não registradas nos EUA e em outros países.