USlateBlueprintLibrary::ScreenToWidgetLocal

Translates a screen position in pixels into the local space of a widget with the given geometry.

Choose your operating system:

Windows

macOS

Linux

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Blueprint/SlateBlueprintLibrary.h

Include

#include "Blueprint/SlateBlueprintLibrary.h"

Source

/Engine/Source/Runtime/UMG/Private/SlateBlueprintLibrary.cpp

Syntax

static void ScreenToWidgetLocal
(
    UObject * WorldContextObject,
    const FGeometry & Geometry,
    FVector2D ScreenPosition,
    FVector2D & LocalCoordinate,
    bool bIncludeWindowPosition
)

Remarks

Translates a screen position in pixels into the local space of a widget with the given geometry. If bIncludeWindowPosition is true, then this method will also remove the game window's position (useful when in windowed mode).