I’ve followed two tutorials on how to make a UI system that can be controlled with a gamepad, but nothing’s working. Why could this be? Also, please let me know if any additional information is needed. (Note that Focus modes are set to “All” for all buttons, and their neighbors all set.)
Does gamepad navigation work once focus is set? That is, once you’ve clicked a button with the mouse (which will give it focus) can you move focus with the gamepad?
Is there some visual indication of which button has focus?
If one of the buttons has focus, Godot should move that focus around based on gamepad input, but it doesn’t do “press”; you have to handle that yourself. In my code, I’ve got something like:
# This would be on VBoxContainer in your scene, probably?
func _process(delta: float) -> void:
if Input.is_action_just_pressed("GUI Select"):
for entry: Node in get_children():
if entry.has_focus():
match(entry.name):
"Play Button": _activate_play()
"Minigames Button": _activate_minigames()
"Settings Button": _activate_settings()