How to disable focus when i select item in ListView?
When I select an item in the ListView while running, the character stops and the TAB key does not work.
if i click on the space around the ListView, TAB key starts working again. If i use “On item Clicked(***ListView)” “Set Focus” to another widget or “Set Focus to Game Viewport”, TAB key starts working immediately. But the character still stops and you need to press the run key again.
I use input mode “Game and UI”. Is Focusable=False, Return Focus to Selection=False, in Project Settings Render Focus Rule=Never.
TAB key is used to change the visibility of the widget in which the ListView is located (opening/closing inventory/crafting).
To show and hide the cursor i change the value of variable ShowMouseCursor in the controller.
I want to draw your attention to the fact that the main problem is that the character stops while running when selecting an item in ListView. That is, the input of WASD keys is interrupted. This doesn’t happen with any other interface elements.
I used to have the same problem with ListView until I added support for controlling focusability of the listview and the contained entries to my engine built from source.
One function I had to change was the implementation of SupportsKeyboardFocus in SObjectTableRow from
Of course you’ll need to add that as a new member to the class, the FArguments and the Construct function. And then you also need to make sure the ListView passes its setting on to any of the generated entries that are created in UListViewBase::GenerateTypedEntry.