This is an issue for Controller/Gamepad control.
I have 2 vertical lists of buttons next to each other, the second list can change in size from none or one button, to many buttons in a scrollbox. The first vertical box is a list of item types to buy at a store, the second vertical box is the list of items that can be bought.
If there are many items in this list, the normal “escape” navigation rule is fine as it will select a button next to it in the right box. However when there are very few items in this list the “focus” doesnt move off the button. i want the navigation rule to check if it “hits a wall” or cant move, THEN do a custom navigation rule where I select the lowest button in the list.
I can’t figure out how to do this or if there is a node that can be used in this scenario.
Check “Is Variable” in the designer tab for your second vertical box. When you create a custom navigation function for whichever key or direction you want (presumably left), drag out and “Get” the vertical box variable (in the below screenshot that vertical box is the “Attribute Picker Box”.
Then drag out and “Get All Children”.
From the return value drag out and “Get a Copy”. If you leave the number to 0, it will automatically get the first widget/button it can focus on in the vertical box.
Then drag out the “Set Focus” and make the target the result from “Get a Copy”. It should end up looking something like the photo.
If you need to expand upon it any, I’m pasting a link to the tutorials that helped me get through it. Its the third out of four videos, but this is the one that goes through this particular functionality. Hope this helps!