Meer informatie
Engine-klasse
ChatInputBarConfiguration
Niet maakbaar

*Deze inhoud is vertaald met behulp van AI (bèta) en kan fouten bevatten. Klik hier om deze pagina in het Engels te bekijken.


Codevoorbeelden
Krijg Totale Chat UI Grenzen
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
-- Bereken de unie van beide rechthoeken om totale chat UI grenzen te krijgen.
-- De gerapporteerde waarden omvatten niet de decoratieve afschuin aan de boven
-- en onderrand van het chatvenster.
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
-- Wacht tot de chat UI is geïnitialiseerd en rapporteer absolute waarden
task.wait(2)
local position, size = getTotalChatBounds()
print("Totale chat UI positie:", position)
print("Totale chat UI grootte:", size)
-- Overlay een semi-transparante frame om de grenzen visueel te verifiëren
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

API-referentie
Eigenschappen
AbsolutePosition
Alleen-lezen
Niet gerepliceerd
Mogelijkheden: Chat
ChatInputBarConfiguration.AbsolutePosition:Vector2

AbsoluteSize
Alleen-lezen
Niet gerepliceerd
Mogelijkheden: Chat
ChatInputBarConfiguration.AbsoluteSize:Vector2

AutocompleteEnabled
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.AutocompleteEnabled:boolean

BackgroundColor3
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.BackgroundColor3:Color3

BackgroundTransparency
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.BackgroundTransparency:number

Enabled
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.Enabled:boolean

FontFace
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.FontFace:Font

IsFocused
Alleen-lezen
Niet gerepliceerd
Mogelijkheden: Chat
ChatInputBarConfiguration.IsFocused:boolean
Codevoorbeelden
Typen Indicator Bubble
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()
-- Stel de TextLabel in
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
-- Voeg een UICorner toe aan de TextLabel voor afgeronde hoeken
local uiCorner = Instance.new("UICorner")
uiCorner.CornerRadius = UDim.new(0, 12)
uiCorner.Parent = textLabel
-- Stel de Billboard in
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()
-- Schakel de typen indicator in wanneer de invoerbalk gefocust is en schakel deze anders uit
typingIndicatorBillboard.Enabled = ChatInputBarConfiguration.IsFocused
end)

KeyboardKeyCode
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.KeyboardKeyCode:Enum.KeyCode

PlaceholderColor3
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.PlaceholderColor3:Color3

TargetTextChannel
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.TargetTextChannel:TextChannel

TextBox
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.TextBox:TextBox

TextColor3
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.TextColor3:Color3

TextSize
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.TextSize:number

TextStrokeColor3
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.TextStrokeColor3:Color3

TextStrokeTransparency
Parallel lezen
Mogelijkheden: Chat
ChatInputBarConfiguration.TextStrokeTransparency:number

©2026 Roblox Corporation. Roblox, het Roblox-logo en Powering Imagination behoren tot onze geregistreerde en niet-geregistreerde handelsmerken in de VS en andere landen.