in my titlescreen i can hoover with mouse, tab but not the up key.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By deezy

hello. i have really basic code. but i cant switch beetween the start and exit button. i can press down and it changes the hoover but not the up arrow. the up key is working when playing with my sprite but not in the title screeen. here is the code.

func _ready():
$MarginContainer/VBoxContainer/VBoxContainer/TextureButton.grab_focus()

func _physics_process(delta):
if $MarginContainer/VBoxContainer/VBoxContainer/TextureButton. is_hovered() == true:
	$MarginContainer/VBoxContainer/VBoxContainer/TextureButton.grab_focus()
if $MarginContainer/VBoxContainer/VBoxContainer/TextureButton2. is_hovered() == true:
	$MarginContainer/VBoxContainer/VBoxContainer/TextureButton2.grab_focus()
:bust_in_silhouette: Reply From: BraindeadBZH

Have you tried to play with the focus_next and focus_previous parameters for your buttons?

i put in the keys on focusnext and previous but i still have the same problem. but it’s weird. since the down button works fine, but not the up button. and everything else works.

deezy | 2019-09-06 18:14

i dont know if it means anything but i do have the error delta is never used.

deezy | 2019-09-06 18:15

and it seems only the next button work, not previous.

deezy | 2019-09-07 07:01

i also switched my up button to only focus next and it works. but not on previous.

deezy | 2019-09-07 08:05

unc _physics_process(_delta):
if $MarginContainer/VBoxContainer/VBoxContainer/start. is_hovered() or Input.is_action_just_pressed("ui_up") == true:
	$MarginContainer/VBoxContainer/VBoxContainer/start.grab_focus()
if $MarginContainer/VBoxContainer/VBoxContainer/exit. is_hovered() == true:
	$MarginContainer/VBoxContainer/VBoxContainer/exit.grab_focus()

it kind of worked when i put in this, but if i spam the buttons enough, it changes that down is up and up is down for some reason.

deezy | 2019-09-07 08:18