Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/UWidgetLayoutLibrary
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool GetMousePositionScaledByDPI
(
const APlayerController* Player, |
Gets the mouse position of the player controller, scaled by the DPI. | Blueprint/WidgetLayoutLibrary.h |
|
static bool GetMousePositionScaledByDPI
(
const APlayerController* Player, |
Blueprint/WidgetLayoutLibrary.h |
|
GetMousePositionScaledByDPI(const APlayerController *, float &, float &)
Description
Gets the mouse position of the player controller, scaled by the DPI. If you're trying to go from raw mouse screenspace coordinates to fullscreen widget space, you'll need to transform the mouse into DPI Scaled space. This function performs that scaling.
MousePositionScaledByDPI = MousePosition * (1 / ViewportScale).
| Name | GetMousePositionScaledByDPI |
| Type | function |
| Header File | /Engine/Source/Runtime/UMG/Public/Blueprint/WidgetLayoutLibrary.h |
| Include Path | #include "Blueprint/WidgetLayoutLibrary.h" |
| Source | /Engine/Source/Runtime/UMG/Private/WidgetLayoutLibrary.cpp |
UFUNCTION (BlueprintPure, BlueprintCosmetic, Category="Viewport")
static bool GetMousePositionScaledByDPI
(
const APlayerController * Player,
float & LocationX,
float & LocationY
)
GetMousePositionScaledByDPI(const APlayerController *, double &, double &)
| Name | GetMousePositionScaledByDPI |
| Type | function |
| Header File | /Engine/Source/Runtime/UMG/Public/Blueprint/WidgetLayoutLibrary.h |
| Include Path | #include "Blueprint/WidgetLayoutLibrary.h" |
| Source | /Engine/Source/Runtime/UMG/Private/WidgetLayoutLibrary.cpp |
UFUNCTION (BlueprintPure, BlueprintCosmetic, Category="Viewport")
static bool GetMousePositionScaledByDPI
(
const APlayerController * Player,
double & LocationX,
double & LocationY
)