Trying to get common UI working but one issue I have is flushing player input must be done 2 frames after a widget is pushed. Digging in to this a bit seems like the main issue i’m having is here:
bool UCommonUIActionRouterBase::CanProcessNormalGameInput() const
{
if (GetActiveInputMode() == ECommonInputMode::Menu)
{
// We still process normal game input in menu mode if the game viewport has mouse capture
// This allows manipulation of preview items and characters in the world while in menus.
// If this is not desired, disable viewport mouse capture in your desired input config.
const ULocalPlayer& LocalPlayer = *GetLocalPlayerChecked();
if (TSharedPtr<FSlateUser> SlateUser = FSlateApplication::Get().GetUser(GetLocalPlayerIndex()))
{
return LocalPlayer.ViewportClient && SlateUser->DoesWidgetHaveCursorCapture(LocalPlayer.ViewportClient->GetGameViewportWidget());
}
}
return true;
}
DoesWidgetHaveCursorCapture does not get updated in real time and it takes a tick for it to be accurate. Worst thing is CanProcessNormalGameInput isn’t virtual so no way of overriding this behavior. How should I get around this?