Verse UI: Controller navigation requires an initial button press when using only button{} widgets

Summary

With the recent update, we now have HighlightEvents available in the standard button{} class for Verse UI, which allows us to create fully custom buttons. I’ve built my UI using only these buttons, but I’m running into an issue with controller navigation.

When the UI opens, the first button receives focus correctly, but I can’t navigate to any other buttons using the controller. Navigation only starts working after I press (click) the initially focused button.

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

UI/Tools

Steps to Reproduce

  1. Create a standard Widget Blueprint that you intend to use inside your button{} class.
  2. Assign that widget to the button{} class (for example, I used a horizontal Stack Box and added five identical buttons).
  3. Add the widget to the PlayerUI.
  4. Attempt to navigate through the buttons using a controller.

Expected Result

It should navigate between all buttons without pressing any button.

Observed Result

It doesn’t navigate and stays focused on one button until you press it once. After that, navigation works.

(Check attached video link below)

Platform(s)

PC

Video

Hello,
Thank you for your report. Could you please verify the following:

  • the root userwidget in the Widget Blueprint class has “Is Focusable” set to True in the details panel
  • whether you are using any additional verse calls beyond what’s mentioned in the repro steps, such as SetFocus()
  • whether this is an actual navigation issue or if it’s related to Highlight visuals? To confirm this, please print a unique text for each button OnClick, then try navigating to an adjacent button and press it to see if the printed text belongs to the “visually highlighted” button or not.

Thanks,
Zahra

1 Like

Hi Zahra,

Thanks for getting back to me. Please find my answers below:

  1. The Widget Blueprint in question is an Overlay containing only Image and Text widgets. It does not include any Button or interactive widgets, so the “Is Focusable” option is not available, as it only applies to interactive elements.

  1. I’ve tested the behavior both with and without calling SetFocus(), and the result remains the same in both cases.
  2. I followed your suggestion and assigned a unique identifier to each button, printing it on OnClick. The correct ID is printed for each button, confirming that the actual navigation and input are working as expected.


Here is the code:

using { /Fortnite.com/Devices }

using { /UnrealEngine.com/Temporary/UI }

using { /Verse.org/Simulation }

using { UIElements }

using { /Fortnite.com/UI }

using { /UnrealEngine.com/Temporary/SpatialMath }




exit_button := class:


    ExitButtonWidget : WB_ExitButton = WB_ExitButton{}

    var Id : int = 0


    Button : button = button{Slot := button_slot{Widget := color_block{}}}


    Init():void=

        Button.SetWidget(button_slot{Widget := ExitButtonWidget})

        Button.OnClick().Subscribe(SpawnOnButtonClicked)

        Button.HighlightEvent().Subscribe(OnButtonHighlighted)

        Button.UnhighlightEvent().Subscribe(OnButtonUnhighlighted)




    SpawnOnButtonClicked(Widget : widget_message):void=

        spawn. OnButtonClicked(Widget)


    OnButtonClicked(Widget : widget_message)<suspends>:void=

        Print("Exit Button Clicked!")

        set ExitButtonWidget.VF_ButtonClicked = 1.0

        Print("Button Clicked : {Id}")

        Sleep(0.1)

        set ExitButtonWidget.VF_ButtonClicked = 0.0


    OnButtonHighlighted(Widget : widget_message):void=

        set ExitButtonWidget.VF_Hover = 1.0

    OnButtonUnhighlighted(Widget : widget_message):void=

        set ExitButtonWidget.VF_Hover = 0.0


ui_test_device := class(creative_device):


    @editable

    ButtonDevice : button_device = button_device{}


    OnBegin<override>()<suspends>:void=

        ButtonDevice.InteractedWithEvent.Subscribe(CreateButtonTestUI)


    CreateButtonTestUI(Agent : agent):void=

        ExitButtons := for(I := 0..4):

            NewButton := exit_button{}

            set NewButton.Id = I

            NewButton.Init()

            NewButton


        MainOverlay := overlay:

            Slots := array:

                overlay_slot:

                    HorizontalAlignment := horizontal_alignment.Center

                    VerticalAlignment := vertical_alignment.Center

                    Widget := stack_box:

                        Orientation := orientation.Horizontal

                        Slots := for(ExitButton : ExitButtons):

                            stack_box_slot:

                                HorizontalAlignment := horizontal_alignment.Fill

                                VerticalAlignment := vertical_alignment.Fill

                                Widget := overlay:

                                    Slots := array:

                                        overlay_slot:

                                            Widget := color_block{DefaultDesiredSize := vector2{X := 115.0, Y := 115.0}, DefaultOpacity := 0.0}

                                        overlay_slot:

                                            HorizontalAlignment := horizontal_alignment.Center

                                            VerticalAlignment := vertical_alignment.Center

                                            Widget := ExitButton.Button




        if(PlayerUI := GetPlayerUI[player[Agent]]):

            PlayerUI.AddWidget(MainOverlay, player_ui_slot{InputMode := ui_input_mode.All})

If you want, I can send you the project to help you find the issue, connect with me on discord (@supreme.uefn)

@Zahra.Nik Nevermind, i misread your reply and it turns out setting IsFocusable on the root widget which i just found out was off and i turn it on and now its working perfect, navigation works.

Thank you so much :green_heart:

Just one suggestion from me, if you guys can make good docs on it will be really helpful for other people aswell :folded_hands:t2:

1 Like

FORT-1036603 has been ‘Closed’. This is working as intended by design.

1 Like

Could you tell me if this also applies to a UI that is 100% verse based?

Could you tell me if this also applies to a UI that is 100% verse based?

I just bumped into the same issue.

There does not seem to be a way to set a widget as focusable in Verse. Will this be fixed soon?