Dear Friends at Epic,
#Context
In-game instance, run from commandline, editor is not loaded
#Goal
I am trying to hide the mouse cursor for an SWidget after it receives keyboard input focus.
#Issue
I am unable to change it at all.
For testing I am using TextBeam
I am even trying to change the cursor for the gameviewport just as a test
There are only 2 swidgets in my test, game viewport and the widget I am trying to give the input to.
The keyboard input is going to the same widget I am setting cursor for
Any ideas how I can change mouse cursor for SWidget in game instance?
void SVictoryInputText::SetSlateUIMode(bool EnterSlateUI)
{
if(EnterSlateUI)
{
if (JoyInputText.IsValid())
{
FWidgetPath WidgetToFocusPath;
bool bFoundPath = FSlateApplication::Get().FindPathToWidget(FSlateApplication::Get().GetInteractiveTopLevelWindows(), JoyInputText.ToSharedRef(), WidgetToFocusPath);
if (bFoundPath && WidgetToFocusPath.IsValid())
{
FSlateApplication::Get().SetKeyboardFocus(WidgetToFocusPath, EKeyboardFocusCause::SetDirectly);
//No Mouse Cursor
SetCursor(EMouseCursor::TextEditBeam);
FSlateApplication::Get().GetGameViewport()->SetCursor(EMouseCursor::TextEditBeam);
#Thanks!
Thanks!
Rama