Lernen
Engine-Klasse
ChatInputBarConfiguration
Nicht erstellbar

*Dieser Inhalt wurde mit KI (Beta) übersetzt und kann Fehler enthalten. Um diese Seite auf Englisch zu sehen, klicke hier.


Code-Beispiele
Gesamtbildschirmgrenzen des Chat-UI abrufen
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
-- Berechnen Sie die Vereinigung beider Rechtecke, um die gesamten Chat-UI-Grenzen zu erhalten.
-- Die gemeldeten Werte umfassen nicht die dekorative Fase oben
-- und unten am Chatfenster.
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
-- Warten Sie, bis das Chat-UI initialisiert ist und absolute Werte meldet
task.wait(2)
local position, size = getTotalChatBounds()
print("Gesamtposition des Chat-UI:", position)
print("Gesamtgröße des Chat-UI:", size)
-- Überlagern Sie einen halbtransparenten Rahmen, um die Grenzen visuell zu überprüfen
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-Referenz
Eigenschaften
AbsolutePosition
Schreibgeschützt
Nicht repliziert
Funktionen: Chat
ChatInputBarConfiguration.AbsolutePosition:Vector2

AbsoluteSize
Schreibgeschützt
Nicht repliziert
Funktionen: Chat
ChatInputBarConfiguration.AbsoluteSize:Vector2

AutocompleteEnabled
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.AutocompleteEnabled:boolean

BackgroundColor3
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.BackgroundColor3:Color3

BackgroundTransparency
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.BackgroundTransparency:number

Enabled
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.Enabled:boolean

FontFace
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.FontFace:Font

IsFocused
Schreibgeschützt
Nicht repliziert
Funktionen: Chat
ChatInputBarConfiguration.IsFocused:boolean
Code-Beispiele
Tippindikator-Blase
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()
-- Richte das TextLabel ein
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
-- Fügen Sie dem TextLabel einen UICorner hinzu, um abgerundete Ecken zu haben
local uiCorner = Instance.new("UICorner")
uiCorner.CornerRadius = UDim.new(0, 12)
uiCorner.Parent = textLabel
-- Richte das Billboard ein
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()
-- Aktiviere den Tippindikator, wenn die Eingabeleiste fokussiert ist, und deaktiviere ihn sonst
typingIndicatorBillboard.Enabled = ChatInputBarConfiguration.IsFocused
end)

KeyboardKeyCode
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.KeyboardKeyCode:Enum.KeyCode

PlaceholderColor3
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.PlaceholderColor3:Color3

TargetTextChannel
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.TargetTextChannel:TextChannel

TextBox
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.TextBox:TextBox

TextColor3
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.TextColor3:Color3

TextSize
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.TextSize:number

TextStrokeColor3
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.TextStrokeColor3:Color3

TextStrokeTransparency
Parallel lesen
Funktionen: Chat
ChatInputBarConfiguration.TextStrokeTransparency:number

©2026 Roblox Corporation. Roblox, das Roblox-Logo und "Powering Imagination" gehören zu unseren eingetragenen und nicht eingetragenen Markenzeichen in den USA und anderen Ländern.