Hi developers,
We aim to make the gamepad UI highlight work in every possible situation and layout, so your UI works automatically with the gamepad with little effort. We’re excited to share the first set of changes coming to the gamepad UI highlight!
We’ve overhauled the selection algorithm to be able to consider more buttons in all four directions and placed more weight on buttons in the direct path of the direction requested, so you might see some differences in how the UI highlight moves and what objects it selects in your experiences.
Beyond the improvements we are releasing, there is a key point at the end that we’d like your feedback on, so please read through all of the info!
Summary of Improvements
Highlight Movement Logic
- Prioritizes buttons in the requested direction so the highlight moves where players expect
Button Reachability
- Considers all buttons in the requested direction so more buttons will be considered when moving the highlight
- The result is that all of your buttons/selectable UI objects can be accessed by moving the UI highlight with the gamepad
Selection Groups
- If the selected button is part of two selection groups, the highlight is restricted to the intersection of the groups
- This will allow for the creation of nested groups: Selection Group - AddSelectionParent
Highlight Selection
- Improved default highlight selection when first pressing the view button to go into UI selection mode
Bug Fixes
- Calculation of the position of buttons inside scrolling frames
- UI highlight could sometimes move to buttons that were off screen
Details
Movement and Reachability
In this example, the UI highlight is able to property move to all the buttons visible on the screen and reach all the buttons in the scrolling frame.
Selection Groups
More information on how to set Selection Groups can be found here: Selection Group - AddSelectionParent
In this picture, buttons B, C and D are all part of selection group 1. Buttons C and D are also part of selection group 2. The highlight will be able to move from any outside buttons to any button in selection group 1 or 2 but won’t be able to move out. Similarly, any button in selection group 1 will be able to move to buttons in selection group 2 but will not be able to move out.
Example use case - you have a pop up menu and you want to restrict the highlight to the popup and then a smaller section within the popup window. You can leave a selection group by either setting GuiService.SelectedObject yourself or NextSelectionUp/Down/Left/Right on any buttons in the selection group (or you can close the popup).
Previously, you could only create one selection group for each group of UI elements and would not be able to restrict the UI highlight for GuiObjects which are already in a selection group. This change will now allow you to nest multiple selection groups.
Coming Next Year
We have a few additional fixes coming out in the next version.
Scrolling Frames
- If the current selection is in a scrolling frame, the gamepad highlight will prefer other buttons in the same scrolling frame
- The highlight will only move back outside of the scrolling frame if you are at the edge of one of the directions and there are no more selections
Bug Fixes
- Invisible buttons were being highlighted in scrolling frames
Tip: How to Improve UI Highlight Selection
Since our change affects movement logic, we recommend verifying that all the buttons in all your experiences are reachable. If you find that more buttons and labels are being selected than you expect, please mark them as not selectable. We have seen some developers mark labels selectable, that don’t act as buttons and have no functionality.
Give Us Your Feedback
Occluded Buttons
As part of our goal to make gamepad UI selection “just work” in any circumstance or configuration, we have run into a few tricky use cases and are interested in your feedback.
-
An Occluded Button is defined as a button that is inside the same layer collector (within the same ScreenGui, SurfaceGui or BillboardGui) and is completely covered by another GuiObject which is not transparent
-
In this situation, we feel the best logic for our “it just works” goal is to ignore the buttons that are occluded, as this can commonly happen when a popup UI sits on top of another UI that is already open
-
However, this does mean if you purposely put a selectable button on the screen, and then put an image on top of it that is not included with the button UI instance (e.g. not an ImageButton), the gamepad UI highlight would not move to that button (views it as a button that can’t currently be seen by the user)
We realize that some of your experiences might be purposefully layering graphics on top of buttons or other selectable UI objects to get a desired look/design so we want to give you the opportunity to give us feedback on this point.
General Feedback
As always, we’d love to hear your thoughts on all of the changes above. Please respond to this post with any issues due to the changes or suggestions you might have on how we can continue to improve the gamepad UI highlighting system.