USafeZone

The Safe-Zone widget is an essential part of developing a game UI that can run on lots of different non-PC platforms.

Inheritance Hierarchy

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Components/SafeZone.h

Include

#include "Components/SafeZone.h"

Syntax

class USafeZone : public UContentWidget

Remarks

The Safe-Zone widget is an essential part of developing a game UI that can run on lots of different non-PC platforms. While a modern flat panel computer monitor may not have over scan issues, this is a common occurrence for Consoles. It's common for TVs to have extra pixels under the bezel, in addition to projectors and projection TVs having potentially several vertical and horizontal columns of pixels hidden behind or against a black border of the projection screen.

Useful testing console commands to help, simulate the safe zone on PC, r.DebugSafeZone.TitleRatio 0.96 r.DebugActionZone.ActionRatio 0.96

To enable a red band to visualize the safe zone, use this console command, r.DebugSafeZone.Mode controls the debug visualization overlay (0..2, default 0). 0: Do not display the safe zone overlay. 1: Display the overlay for the title safe zone. 2: Display the overlay for the action safe zone.

Variables

Name Description

Protected variable

TOptional< floa...

 

DesignerDpi

Protected variable

TOptional< FVec...

 

DesignerSize

Protected variable

TSharedPtr< cla...

 

MySafeZone

Constructors

Name Description

Public function

USafeZone()

Functions

Name Description

Protected function Const

bool

 

GetPadBottom()

Protected function Const

bool

 

GetPadLeft()

Protected function Const

bool

 

GetPadRight()

Protected function Const

bool

 

GetPadTop()

Protected function

void

 

SetPadBottom

(
    bool InPadBottom
)

Protected function

void

 

SetPadLeft

(
    bool InPadLeft
)

Protected function

void

 

SetPadRight

(
    bool InPadRight
)

Protected function

void

 

SetPadTop

(
    bool InPadTop
)

Public function

void

 

SetSidesToPad

(
    bool InPadLeft,
    bool InPadRight,
    bool InPadTop,
    bool InPadBottom
)

Public function

void

 

UpdateWidgetProperties()

Overridden from UPanelWidget

Name Description

Public function Virtual Const

UClass *

 

GetSlotClass()

UPanelWidget.

Public function Virtual

void

 

OnSlotAdded

(
    UPanelSlot* Slot
)

Public function Virtual

void

 

OnSlotRemoved

(
    UPanelSlot* Slot
)

Overridden from UWidget

Name Description

Public function Virtual

const FText

 

GetPaletteCategory()

Gets the palette category of the widget

Public function Virtual

void

 

OnDesignerChanged

(
    const FDesignerChangedEventArgs& E...
)

Protected function Virtual

TSharedRef< ...

 

RebuildWidget()

Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.

Overridden from UVisual

Name Description

Protected function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Deprecated Variables

Name Description

Public variable

bool

 

PadBottom

Direct access to PadBottom is deprecated. Please use the getter or setter.

Public variable

bool

 

PadLeft

Direct access to PadLeft is deprecated. Please use the getter or setter.

Public variable

bool

 

PadRight

Direct access to PadRight is deprecated. Please use the getter or setter.

Public variable

bool

 

PadTop

Direct access to PadTop is deprecated. Please use the getter or setter.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Cancel