Navigation
Unreal Engine C++ API Reference > Runtime > UMG > Components
Inheritance Hierarchy
- UObject
- UVisual
- UWidget
- UPanelWidget
- UContentWidget
- USafeZone
References
Module | UMG |
Header | /Engine/Source/Runtime/UMG/Public/Components/SafeZone.h |
Include | #include "Components/SafeZone.h" |
Syntax
UCLASS (MinimalAPI)
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
Type | Name | Description | |
---|---|---|---|
TOptional< float > | DesignerDpi | ||
TOptional< FVector2D > | DesignerSize | ||
TSharedPtr< class SSafeZone > | MySafeZone | ||
bool | PadBottom | If this safe zone should pad for the bottom side of the screen's safe zone | |
bool | PadLeft | If this safe zone should pad for the left side of the screen's safe zone | |
bool | PadRight | If this safe zone should pad for the right side of the screen's safe zone | |
bool | PadTop | If this safe zone should pad for the top side of the screen's safe zone |
Constructors
Type | Name | Description | |
---|---|---|---|
USafeZone () |
Functions
Type | Name | Description | |
---|---|---|---|
bool | GetPadBottom () |
||
bool | GetPadLeft () |
||
bool | GetPadRight () |
||
bool | GetPadTop () |
||
void | SetPadBottom
(
bool InPadBottom |
||
void | SetPadLeft
(
bool InPadLeft |
||
void | SetPadRight
(
bool InPadRight |
||
void | SetPadTop
(
bool InPadTop |
||
void | SetSidesToPad
(
bool InPadLeft, |
||
void |
Overridden from UPanelWidget
Type | Name | Description | |
---|---|---|---|
UClass * | GetSlotClass () |
UPanelWidget. | |
void | OnSlotAdded
(
UPanelSlot* Slot |
||
void | OnSlotRemoved
(
UPanelSlot* Slot |
Overridden from UWidget
Type | Name | Description | |
---|---|---|---|
const FText | Gets the palette category of the widget | ||
void | OnDesignerChanged
(
const FDesignerChangedEventArgs& EventArgs |
||
TSharedRef< SWidget > | Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed. |
Overridden from UVisual
Type | Name | Description | |
---|---|---|---|
void | ReleaseSlateResources
(
bool bReleaseChildren |