FSlateApplicationBase::LocateWindowUnderMouse

Given the screen-space coordinate of the mouse cursor, searches for a string of widgets that are under the mouse.

Choose your operating system:

Windows

macOS

Linux

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Application/SlateApplicationBase.h

Include

#include "Application/SlateApplicationBase.h"

Syntax

FWidgetPath LocateWindowUnderMouse
(
    FVector2D ScreenspaceMouseCoordinate,
    const TArray< TSharedRef< SWindow > > & Windows,
    bool bIgnoreEnabledStatus,
    int32 UserIndex
)

Remarks

Given the screen-space coordinate of the mouse cursor, searches for a string of widgets that are under the mouse.

The widgets will be returned with the associated geometry. The first item will always be the top-level window while the last item will be the leaf-most widget.

Returns

The path to the widget.