FSlateApplication::SetUserFocus

Sets user focus to the specified widget. The widget must be allowed to receive focus.

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

FSlateApplicationBase::SetUserFocus()

FSlateApplication::SetUserFocus()

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Framework/Application/SlateApplication.h

Include

#include "Framework/Application/SlateApplication.h"

Source

/Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp

Syntax

virtual bool SetUserFocus
(
    const uint32 InUserIndex,
    const FWidgetPath & InFocusPath,
    const EFocusCause InCause
)

Remarks

Sets user focus to the specified widget. The widget must be allowed to receive focus.

Returns

true if the widget is now focused, false otherwise.

Parameters

Parameter

Description

InUserIndex

Index of the user that we want to change the focus of.

InWidget

WidgetPath to the Widget to being focused.

InCause

The reason that focus is changing.