Error11. ListView手柄聚焦失效无法操作
大约 1 分钟
1.前提
2.去掉虚线选择轮廓

3.聚焦组件

4.重写函数GetDesiredFocus



5.吊用没有的函数 NativeOnFocusReceived
FReply UHeroSkinsWidget::NativeOnFocusReceived(const FGeometry& InGeometry, const FFocusEvent& InFocusEvent)
{
const UCommonInputSubsystem* InputSubsystem = GetInputSubsystem();
if (InputSubsystem && InputSubsystem->GetCurrentInputType() == ECommonInputType::Gamepad)
{
if (SkinListView)
{
SkinListView->NavigateToIndex(0);
SkinListView->SetSelectedIndex(0);
return FReply::Handled();
}
}
return FReply::Unhandled();
}
