ChatInputBarConfiguration

非推奨を表示
作成できません

Configures properties of the default chat input bar.

It is parented to TextChatService.

概要

プロパティ

  • 読み取り専用
    複製されていません

    Describes the actual screen position of the default chat input bar in pixels.

  • 読み取り専用
    複製されていません

    Describes the actual screen size of the default chat input bar in pixels.

  • 並列読み取り

    Determines whether to enable autocomplete for the chat input bar.

  • 並列読み取り

    Determines the background color of the default chat input bar.

  • 並列読み取り

    Determines the background transparency of the default chat input bar.

  • 並列読み取り

    Determines whether to show the default chat input bar.

  • 並列読み取り

    Determines the font used to render text in the default chat input bar.

  • 読み取り専用
    複製されていません

    Describes if the default chat input bar is focused or not.

  • 並列読み取り

    Determines an additional key users can press to trigger focusing on the default chat input bar.

  • 並列読み取り

    Determines the color of the text of the placeholder text in the default chat input bar.

  • 並列読み取り

    A reference to the target TextChannel.

  • 並列読み取り

    A reference to a designated TextBox Instance that sends messages on behalf of the user. This property only accepts TextBox instances.

  • 並列読み取り

    Determines the color of the text in default chat input bar.

  • 並列読み取り

    Determines the size of the text in default chat input bar.

  • 並列読み取り

    Determines the color of the text stroke of text in default chat input bar.

  • 並列読み取り

    Determines the transparency of the text stroke of text in default chat input bar.

プロパティ

AbsolutePosition

読み取り専用
複製されていません

Read-only property that provides the screen position of the default chat input bar in pixels. Behaves similarly to GuiBase2d.AbsolutePosition.

AbsoluteSize

読み取り専用
複製されていません

Read-only property that provides the screen size of the default chat input bar in pixels. Behaves similarly to GuiBase2d.AbsoluteSize.

AutocompleteEnabled

並列読み取り

Determines whether to enable autocomplete for the chat input bar. Set to false to disable autocomplete.

BackgroundColor3

並列読み取り

Determines the background color of the default chat input bar. Default value is Color3.new(25,27,29).

BackgroundTransparency

並列読み取り

Determines the background transparency of the default chat input bar as a number between 0 and 1. This value is multiplied with the user's GuiService.PreferredTransparency to create the effective background transparency used by the chat input bar, which may be more opaque than this value set here. Default value is 0.2.

Enabled

並列読み取り

Determines whether to show the default chat input bar.

Set to false to hide the default chat input bar.

FontFace

並列読み取り

Determines the font used to render text in the default chat input bar.

IsFocused

読み取り専用
複製されていません

Indicates whether the default chat input bar is focused or not. Useful for firing property changed events so you can implement callback functions that respond to changes in the input bar's focus state.

コードサンプル

Typing 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()
-- Set up 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
-- Parent a UICorner to the TextLabel to have rounded corners
local uiCorner = Instance.new("UICorner")
uiCorner.CornerRadius = UDim.new(0,12)
uiCorner.Parent = textLabel
-- Set up 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()
-- Enable the typing indicator when the input bar is focused and disable otherwise
typingIndicatorBillboard.Enabled = ChatInputBarConfiguration.IsFocused
end)

KeyboardKeyCode

並列読み取り

Determines an additional key users can press to trigger focusing on the default chat input bar. Useful when you want to have an extra hotkey for focusing in addition to the "/" key.

PlaceholderColor3

並列読み取り

Determines the color of the text of the placeholder text in the default chat input bar. Default value is Color3.new(178, 178, 178).

TargetTextChannel

並列読み取り

A reference to the target TextChannel.

Determines which TextChannel to use when the user sends a message with the default chat input bar.

TextBox

並列読み取り

A reference to a designated TextBox Instance that sends messages on behalf of the user. This property only accepts TextBox instances.

You can use it to further integrate your custom chat input bar UI into your experience by freely manipulating appearance, location, and layout. When opting to set this property to a custom TextBox, you don't need to write any code for the following behavior:

For security, some limitations are imposed on the TextBox when it is promoted to ChatInputBarConfiguration.TextBox. Lua code will not be able to:

TextColor3

並列読み取り

Determines the color of the text in default chat input bar. Default value is Color3.new(255, 255, 255) (white).

TextSize

並列読み取り

Determines the size of the text in default chat input bar. Default value is 14.

TextStrokeColor3

並列読み取り

Determines the color of the text stroke of text in default chat input bar. Default value is Color3.new(0, 0, 0) (black).

TextStrokeTransparency

並列読み取り

Determines the color of the text stroke of text in default chat input bar. Default value is 0.5.

方法

イベント