Navigation
API > API/Runtime > API/Runtime/Slate
Here's how you could make use of TitleSafe and ActionSafe areas:
SNew(SOverlay) +SOverlay::Slot() [ / ActioSafe SNew(SSafeZone) .IsTitleSafe( false ) ] +SOverlay::Slot() [ / TitleSafe SNew(SSafeZone) .IsTitleSafe( true ) ]
| Name | SSafeZone |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Layout/SSafeZone.h |
| Include Path | #include "Widgets/Layout/SSafeZone.h" |
Syntax
class SSafeZone : public SBox
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SPanel → SBox → SSafeZone
- FSlateControlledConstruction → SWidget → SPanel → SBox → SSafeZone
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SSafeZone() |
Widgets/Layout/SSafeZone.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~SSafeZone() |
Widgets/Layout/SSafeZone.h |
Structs
| Name | Remarks |
|---|---|
| FArguments |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsTitleSafe | bool | Widgets/Layout/SSafeZone.h | ||
| bPadBottom | bool | Widgets/Layout/SSafeZone.h | ||
| bPadLeft | bool | Widgets/Layout/SSafeZone.h | ||
| bPadRight | bool | Widgets/Layout/SSafeZone.h | ||
| bPadTop | bool | Widgets/Layout/SSafeZone.h | ||
| bSafeMarginNeedsUpdate | bool | Does the SafeMargin need an update? | Widgets/Layout/SSafeZone.h | |
| OnSafeFrameChangedHandle | FDelegateHandle | Widgets/Layout/SSafeZone.h | ||
| OverrideDpiScale | TOptional< float > | Widgets/Layout/SSafeZone.h | ||
| OverrideScreenSize | TOptional< FVector2D > | Widgets/Layout/SSafeZone.h | ||
| Padding | TSlateAttribute< FMargin, EInvalidateWidgetReason::Layout > | Cached values from the args | Widgets/Layout/SSafeZone.h | |
| SafeAreaScale | FMargin | Widgets/Layout/SSafeZone.h | ||
| SafeMargin | FMargin | Screen space margin | Widgets/Layout/SSafeZone.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs |
Widgets/Layout/SSafeZone.h | ||
void DebugSafeAreaUpdated
(
const FMargin& NewSafeZone, |
Widgets/Layout/SSafeZone.h | ||
FMargin GetSafeMargin
(
float InLayoutScale |
Widgets/Layout/SSafeZone.h | ||
| Widgets/Layout/SSafeZone.h | |||
void SetSafeAreaScale
(
FMargin InSafeAreaScale |
Widgets/Layout/SSafeZone.h | ||
void SetSidesToPad
(
bool InPadLeft, |
Widgets/Layout/SSafeZone.h | ||
void SetTitleSafe
(
bool bIsTitleSafe |
Widgets/Layout/SSafeZone.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector2D ComputeDesiredSize
(
float LayoutScale |
Widgets/Layout/SSafeZone.h | ||
virtual void OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Widgets/Layout/SSafeZone.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TOptional< float > GetGlobalSafeZoneScale() |
Widgets/Layout/SSafeZone.h | ||
static void SetGlobalSafeZoneScale
(
TOptional< float > InScale |
Widgets/Layout/SSafeZone.h |