Navigation
Unreal Engine C++ API Reference > Runtime > UMG > Blueprint
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UBlueprintFunctionLibrary
- UWidgetLayoutLibrary
References
Module | UMG |
Header | /Engine/Source/Runtime/UMG/Public/Blueprint/WidgetLayoutLibrary.h |
Include | #include "Blueprint/WidgetLayoutLibrary.h" |
Syntax
class UWidgetLayoutLibrary : public UBlueprintFunctionLibrary
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UWidgetLayoutLibrary
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FVector2D | Gets the platform's mouse cursor position. This is the 'absolute' desktop location of the mouse. | |
![]() ![]() |
FVector2D | GetMousePositionOnViewport
(
UObject* WorldContextObject |
Gets the platform's mouse cursor position in the local space of the viewport widget. |
![]() ![]() |
bool | GetMousePositionScaledByDPI
(
APlayerController* Player, |
|
![]() ![]() |
FGeometry | GetPlayerScreenWidgetGeometry
(
APlayerController* PlayerController |
Gets the geometry of the widget holding all widgets added to the "Player Screen". |
![]() ![]() |
float | GetViewportScale
(
const UObject* WorldContextObject |
Gets the current DPI Scale being applied to the viewport and all the Widgets. |
![]() ![]() |
float | GetViewportScale
(
const UGameViewportClient* ViewportClient |
Gets the current DPI Scale being applied to the viewport and all the Widgets. |
![]() ![]() |
FVector2D | GetViewportSize
(
UObject* WorldContextObject |
Gets the size of the game viewport. |
![]() ![]() |
FGeometry | GetViewportWidgetGeometry
(
UObject* WorldContextObject |
Gets the geometry of the widget holding all widgets added to the "Viewport". |
![]() ![]() |
bool | ProjectWorldLocationToWidgetPosition
(
APlayerController* PlayerController, |
Gets the projected world to screen position for a player, then converts it into a widget position, which takes into account any quality scaling. |
![]() ![]() |
bool | ProjectWorldLocationToWidgetPositionWithDistance
(
APlayerController* PlayerController, |
Convert a World Space 3D position into a 2D Widget Screen Space position, with distance from the camera the Z component. |
![]() ![]() |
void | RemoveAllWidgets
(
UObject* WorldContextObject |
Removes all widgets from the viewport. |
![]() ![]() |
UBorderSlot * | SlotAsBorderSlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Border Slot, allowing you to manipulate layout information. |
![]() ![]() |
UCanvasPanelSlot * | SlotAsCanvasSlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Canvas Slot, allowing you to manipulate layout information. |
![]() ![]() |
UGridSlot * | SlotAsGridSlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Grid Slot, allowing you to manipulate layout information. |
![]() ![]() |
UHorizontalBoxSlot * | SlotAsHorizontalBoxSlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Horizontal Box Slot, allowing you to manipulate its information. |
![]() ![]() |
UOverlaySlot * | SlotAsOverlaySlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Overlay Slot, allowing you to manipulate layout information. |
![]() ![]() |
USafeZoneSlot * | SlotAsSafeBoxSlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Safe Box Slot, allowing you to manipulate its information. |
![]() ![]() |
UScaleBoxSlot * | SlotAsScaleBoxSlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Scale Box Slot, allowing you to manipulate its information. |
![]() ![]() |
UScrollBoxSlot * | SlotAsScrollBoxSlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Scroll Box Slot, allowing you to manipulate its information. |
![]() ![]() |
USizeBoxSlot * | SlotAsSizeBoxSlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Size Box Slot, allowing you to manipulate its information. |
![]() ![]() |
UUniformGridSlot * | SlotAsUniformGridSlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Uniform Grid Slot, allowing you to manipulate layout information. |
![]() ![]() |
UVerticalBoxSlot * | SlotAsVerticalBoxSlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Vertical Box Slot, allowing you to manipulate its information. |
![]() ![]() |
UWidgetSwitcherSlot * | SlotAsWidgetSwitcherSlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Widget Switcher Slot, allowing you to manipulate its information. |
![]() ![]() |
UWrapBoxSlot * | SlotAsWrapBoxSlot
(
UWidget* Widget |
Gets the slot object on the child widget as a Wrap Box Slot, allowing you to manipulate its information. |
Deprecated Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
bool | GetMousePositionScaledByDPI
(
APlayerController* Player, |
Use GetMousePositionOnViewport() instead. Optionally and for more options, you can use GetViewportWidgetGeometry and GetPlayerScreenWidgetGeometry are newly introduced to give you the geometry of the viewport and the player screen for widgets to help convert between spaces. |