Empty
Empty
Empty
ScreenGui는 Roblox에서 플레이어의 화면에 2D 사용자 인터페이스 요소를 표시하는 컨테이너입니다. 필수적인 제어 및 정보를 제공합니다.
** PlayerGui에 부모로 설정되어야만 보입니다. StarterGui를 사용하면 각 플레이어가 게임에 참여할 때 PlayerGui로 복제됩니다.
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = game.Players.LocalPlayer: WaitForChild("PlayerGui")
ScreenGui 속성
Types | Details |
---|---|
ClipToDeviceSafeArea | 콘텐츠를 장치의 안전 영역에 맞춥니다. |
DisplayOrder | ScreenGuis의 Z-인덱스 순서를 제어하며, 값이 높을수록 위에 렌더링됩니다. |
IgnoreGuiInset | ScreenGui가 Roblox의 기본 UI 요소에 겹쳐지는지를 결정합니다. |
ScreenInsets | 화면에 표시될 영역을 정의합니다. |
CoreUISafeInsets (기본 UI 안전 영역)
CoreUISafeInsets | UI 요소가 기본 UI 안전 영역 내에 유지되어 상단 바 버튼 및 화면 컷아웃을 피합니다 (기본 설정). |
None | 안전 영역 제한이 없으며, UI 요소가 기본 UI 또는 장치 컷아웃에 의해 가려질 수 있습니다. 비상호작용 콘텐츠에 적합합니다. |
TopbarSafeInsets | UI 요소가 Roblox의 왼쪽 제어 요소와 장치 안전 영역 사이에 위치하도록 하여 충돌을 피하기 위해 동적으로 조정됩니다. |
DeviceSafeInsets | 장치의 전체 안전 영역에 대한 인셋을 적용하여 화면 컷아웃이나 노치를 피합니다. |
Empty
Empty
Empty
Roblox Studio
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Display_CoreUISafeInsets"
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
screenGui.ScreenInsets = Enum.ScreenInsets.CoreUISafeInsets
local frame = Instance.new("Frame")
frame.Size = UDim2.new(1, 0, 1, 0)
frame.Position = UDim2.new(0, 0, 0, 0)
frame.BackgroundTransparency = 0.5
frame.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Red for CoreUISafeInsets
frame.Parent = screenGui
local label = Instance.new("TextLabel")
label.Text = "CoreUISafeInsets"
label.BackgroundTransparency = 0
label.BackgroundColor3 = Color3.fromRGB(255, 255, 255) -- White background
label.TextColor3 = Color3.fromRGB(0, 0, 0) -- Black text
label.Size = UDim2.new(0.3, 0, 0.1, 0)
label.Position = UDim2.new(0.35, 0, 0.45, 0)
label.Parent = frame
Empty
Empty
Empty
Roblox Studio
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Display_None"
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
screenGui.ScreenInsets = Enum.ScreenInsets.None
local frame = Instance.new("Frame")
frame.Size = UDim2.new(1, 0, 1, 0)
frame.Position = UDim2.new(0, 0, 0, 0)
frame.BackgroundTransparency = 0.5
frame.BackgroundColor3 = Color3.fromRGB(0, 255, 0) -- Green for None
frame.Parent = screenGui
local label = Instance.new("TextLabel")
label.Text = "None"
label.BackgroundTransparency = 0
label.BackgroundColor3 = Color3.fromRGB(255, 255, 255) -- White background
label.TextColor3 = Color3.fromRGB(0, 0, 0) -- Black text
label.Size = UDim2.new(0.3, 0, 0.1, 0)
label.Position = UDim2.new(0.35, 0, 0.45, 0)
label.Parent = frame
Empty
Empty
Empty
Roblox Studio
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Display_TopbarSafeInsets"
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
screenGui.ScreenInsets = Enum.ScreenInsets.TopbarSafeInsets
local frame = Instance.new("Frame")
frame.Size = UDim2.new(1, 0, 1, 0)
frame.Position = UDim2.new(0, 0, 0, 0)
frame.BackgroundTransparency = 0.5
frame.BackgroundColor3 = Color3.fromRGB(0, 0, 255) -- Blue for TopbarSafeInsets
frame.Parent = screenGui
local label = Instance.new("TextLabel")
label.Text = "TopbarSafeInsets"
label.BackgroundTransparency = 0
label.BackgroundColor3 = Color3.fromRGB(255, 255, 255) -- White background
label.TextColor3 = Color3.fromRGB(0, 0, 0) -- Black text
label.Size = UDim2.new(0.3, 0, 0.1, 0)
label.Position = UDim2.new(0.35, 0, 0.45, 0)
label.Parent = frame
Empty
Empty
Empty
Roblox Studio
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Display_DeviceSafeInsets"
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
screenGui.ScreenInsets = Enum.ScreenInsets.DeviceSafeInsets
local frame = Instance.new("Frame")
frame.Size = UDim2.new(1, 0, 1, 0)
frame.Position = UDim2.new(0, 0, 0, 0)
frame.BackgroundTransparency = 0.5
frame.BackgroundColor3 = Color3.fromRGB(255, 255, 0) -- Yellow for DeviceSafeInsets
frame.Parent = screenGui
local label = Instance.new("TextLabel")
label.Text = "DeviceSafeInsets"
label.BackgroundTransparency = 0
label.BackgroundColor3 = Color3.fromRGB(255, 255, 255) -- White background
label.TextColor3 = Color3.fromRGB(0, 0, 0) -- Black text
label.Size = UDim2.new(0.3, 0, 0.1, 0)
label.Position = UDim2.new(0.35, 0, 0.45, 0)
label.Parent = frame