Language:
Discover
By Skill Level
By Category

USafeZone

Choose your OS:

Inheritance Hierarchy

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

Public variable

bool

 

PadBottom

If this safe zone should pad for the bottom side of the screen's safe zone

Public variable

bool

 

PadLeft

If this safe zone should pad for the left side of the screen's safe zone

Public variable

bool

 

PadRight

If this safe zone should pad for the right side of the screen's safe zone

Public variable

bool

 

PadTop

If this safe zone should pad for the top side of the screen's safe zone

Constructors

Name Description

Public function

USafeZone()

Functions

Name Description

Public function

void

 

SetSidesToPad

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

Public function

void

 

UpdateWidgetProperties()

Overridden from UPanelWidget

Name Description

Public function Virtual

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()

UWidget interface.

Overridden from UVisual

Name Description

Protected function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

End of UWidget interface.

References

Module

UMG

Header

Runtime/UMG/Public/Components/SafeZone.h