mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
178 lines
5.3 KiB
YAML
178 lines
5.3 KiB
YAML
# This file is automatically generated. Please don't edit it manually.
|
|
# To submit a bug report on the content, see
|
|
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
|
|
|
|
name: PlayerGui
|
|
type: class
|
|
memory_category: Instances
|
|
summary: |
|
|
A container for a player's currently rendered `Class.ScreenGui|ScreenGuis`.
|
|
description: |
|
|
`Class.PlayerGui` is a container that holds a player's UI. If a
|
|
`Class.ScreenGui` is a descendant, then any `Class.GuiObject` inside of the
|
|
`Class.ScreenGui` will be drawn to the player's screen. Any
|
|
`Class.LocalScript` will also run if it is inserted into a `Class.PlayerGui`.
|
|
|
|
When a player first joins the experience, their `Class.PlayerGui` is
|
|
automatically inserted into their `Class.Player` object. When the player's
|
|
`Class.Player.Character` spawns for the first time, all of the contents of
|
|
`Class.StarterGui` are automatically copied into the player's
|
|
`Class.PlayerGui`. Note that if `Class.Players.CharacterAutoLoads` is set to
|
|
`false`, the character will not spawn and `Class.StarterGui` contents will not
|
|
be copied until `Class.Player:LoadCharacterAsync()` is called. If
|
|
`Class.StarterGui.ResetPlayerGuiOnSpawn` is set to `true`, then every time the
|
|
player's character respawns, all of the contents of that player's
|
|
`Class.PlayerGui` are cleared and replaced with the contents of
|
|
`Class.StarterGui`.
|
|
|
|
If you need to control a player's UI container during playtime, for example to
|
|
show/hide a specific `Class.ScreenGui` or any of its children, access it as
|
|
follows from a `Class.LocalScript`:
|
|
|
|
```lua
|
|
local Players = game:GetService("Players")
|
|
|
|
local player = Players.LocalPlayer
|
|
local playerGui = player.PlayerGui
|
|
```
|
|
code_samples: []
|
|
inherits:
|
|
- BasePlayerGui
|
|
descendants: []
|
|
tags:
|
|
- NotCreatable
|
|
- PlayerReplicated
|
|
deprecation_message: ''
|
|
properties:
|
|
- name: PlayerGui.CurrentScreenOrientation
|
|
summary: |
|
|
Describes the player's current screen orientation.
|
|
description: |
|
|
Describes the player's current screen orientation.
|
|
code_samples: []
|
|
type: ScreenOrientation
|
|
tags:
|
|
- ReadOnly
|
|
- NotReplicated
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: Data
|
|
serialization:
|
|
can_load: false
|
|
can_save: false
|
|
capabilities:
|
|
- UI
|
|
- name: PlayerGui.ScreenOrientation
|
|
summary: |
|
|
Sets the preferred screen orientation mode for this player, if on a mobile
|
|
device.
|
|
description: |
|
|
Sets the preferred screen orientation mode for this player, if on a mobile
|
|
device.
|
|
code_samples: []
|
|
type: ScreenOrientation
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: Data
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- UI
|
|
- name: PlayerGui.SelectionImageObject
|
|
summary: |
|
|
Overrides the default selection adornment used for gamepads.
|
|
description: |
|
|
Overrides the default selection adornment used for gamepads. For best
|
|
results, this should point to a `Class.GuiObject`.
|
|
code_samples: []
|
|
type: GuiObject
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: Appearance
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- UI
|
|
methods:
|
|
- name: PlayerGui:GetTopbarTransparency
|
|
summary: |
|
|
Returns the transparency of the Topbar.
|
|
description: |
|
|
Returns the transparency of the Topbar.
|
|
code_samples:
|
|
- PlayerGui-GetTopbarTransparency1
|
|
parameters: []
|
|
returns:
|
|
- type: float
|
|
summary: ''
|
|
tags:
|
|
- Deprecated
|
|
deprecation_message: ''
|
|
security: None
|
|
thread_safety: Unsafe
|
|
capabilities:
|
|
- UI
|
|
- name: PlayerGui:SetTopbarTransparency
|
|
summary: |
|
|
Sets the transparency of the top bar.
|
|
description: |
|
|
This method sets the transparency of the top bar `Class.CoreGui`. A value
|
|
of `0` is completely opaque and a value of `1` is completely transparent.
|
|
Values outside of the range `[0, 1]` are clamped. The default transparency
|
|
of the topbar is `0.5`.
|
|
|
|
Using the `Class.StarterGui:SetCore()` method with the `"TopbarEnabled"`
|
|
option allows you to enable/disable the entire topbar and all of its
|
|
features (player list, health, etc). By contrast, this method only affects
|
|
how the top bar is displayed.
|
|
code_samples:
|
|
- PlayerGui-SetTopbarTransparency1
|
|
- custom-topbar-style
|
|
parameters:
|
|
- name: transparency
|
|
type: float
|
|
default:
|
|
summary: ''
|
|
returns:
|
|
- type: ()
|
|
summary: ''
|
|
tags:
|
|
- Deprecated
|
|
deprecation_message: ''
|
|
security: None
|
|
thread_safety: Unsafe
|
|
capabilities:
|
|
- UI
|
|
events:
|
|
- name: PlayerGui.TopbarTransparencyChangedSignal
|
|
summary: |
|
|
Fires when the transparency of the Topbar CoreGui changes.
|
|
description: |
|
|
Fires when the transparency of the Topbar CoreGui changes.
|
|
code_samples:
|
|
- PlayerGui-TopbarTransparencyChangedSignal1
|
|
parameters:
|
|
- name: transparency
|
|
type: float
|
|
default:
|
|
summary: ''
|
|
tags:
|
|
- Deprecated
|
|
deprecation_message: ''
|
|
security: None
|
|
capabilities:
|
|
- UI
|
|
callbacks: []
|