s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
RootPanel
chevron_left
Classes
class
RootPanel
search
Constructors
functions
RootPanel
Properties
data_object
IsHighQualityVR
data_object
IsVR
data_object
IsWorldPanel
data_object
PanelBounds
data_object
RenderedManually
data_object
Scale
Methods
functions
Delete
functions
OnDeleted
functions
OnLayout
functions
RenderManual
lock
UpdateBounds
lock
UpdateScale
RootPanel
A root panel. Serves as a container for other panels, handles things such as rendering.
class
Sandbox.UI
.
account_tree
extends
Panel
Sandbox.Engine
build
Constructors
1
RootPanel
(
)
data_object
Properties
6
IsHighQualityVR
bool
If this panel should be rendered with ~4K resolution.
IsVR
bool
If this panel belongs to a VR overlay
IsWorldPanel
bool
True if this is a world panel, so should be skipped when determining cursor visibility etc
PanelBounds
Rect
Bounds of the panel, i.e. its size and position on the screen.
RenderedManually
bool
If set to true this panel won't be rendered to the screen like a normal panel. This is true when the panel is drawn via other means (like as a world panel).
Scale
float
The scale of this panel and its children.
functions
Methods
6
Delete
(
immediate
)
OnDeleted
(
)
OnLayout
(
layoutRect
)
RenderManual
(
opacity
)
Render this panel manually. This gives more flexibility to where UI is rendered, to texture for example. Sandbox.UI.RootPanel.RenderedManually must be set to true.
UpdateBounds
(
rect
)
Called before layout to lock the bounds of this root panel to the screen size (which is passed). Internally this sets PanelBounds to rect and calls UpdateScale.
UpdateScale
(
screenSize
)
Work out scaling here. Default is to scale relative to the screen being 1920 wide. ie - scale = screensize.Width / 1920.0f;
Inheritance
Panel
RootPanel
WorldPanel
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.