How to indicate start position of UI selection in default UI navigation elements ?

Justus

Member
in a full controller/keyboard control mode(no mouse)
When I open my inventory panel(with equipment and other panel attached), the cursor is located in the top left of Equipment view
1651816450072.png

if I close the inventory panel and open it again, the default UI selection will become the left top of Inventory grid.
1651816531321.png

My question is: How could I control this behavior( the default position of selection when I open panel)?

For example:
- Case 1: I want to make the UI selection always starts at the left top of inventory grid when I open the inventory panel
- Case 2: I want to make the UI Selection always `Remember` its position at the last close moment, and when I open the panel again, it's still in the same slot.

All of above are discussed in an no-mouse mode. the default position of UI selection is important for no-mouse player.
 
So in UIS when you open a panel you can tell it what was the previous panel and the previous selectable.

This is the function the DisplayPanel that you would call.
1651823982718.png

So if the "selectDefault" is true you can say to open the panel using the default selectable set in the inspector (you can set the top left)

Knowing the previousPanel and PreviousSelectable, when you close a panel it can open and select the previous panel.
1651824119593.png

We often use the "SmartOpen" and "SmartClose" options which allows panels to automatically open/close previous panels and select the precious selectables.

So instead of using "SmartOpen/Close" you could manually call the open close overloads to have more control.

You can make custom DisplayPanels and or DisplayPanelManagers if you wish to customize any of these things even further.

There is also the option to completely replace DisplayPanel and the DisplayPanelManager but that is a lot more work. It is easier to keep them can have customize or have something else that controls them.

I hope that helps
 
It's probably because of this "Select Slot On Open". This selects the first slot when you open after you have selected the default selectable
1651827984314.png
 
There is nothing for that built-in. You would need to keep track of that yourself.
I added an option to keep track of the slot using the ItemViewSlotsContainerPanelBinding. I hope that helps
 

Attachments

  • ItemViewSlotsContainerPanelBinding.cs
    4.9 KB · Views: 1
Steps to get the remeber selection effect when you have multiple container panel views always show at same time( inventory + equipment, for example).
1. leave `Selectable On Open` empty for all panel
2. uncheck `Select Slot On Open` on each Panel Binding component( so that each one will not change the selection forcely)
3. check `Remember Selected Slot` on each Panel Binding component
1652084457641.png
 
There is nothing for that built-in. You would need to keep track of that yourself.
I added an option to keep track of the slot using the ItemViewSlotsContainerPanelBinding. I hope that helps
if `Is Menu Panel` set to false,
`Remember Selected Slot` will not work
1652088213996.png
 
Top