0 votes

here is the source code for my project

extends Control
func _ready():
$HBoxContainer/VBoxContainer/Button.grab_focus()


func _physics_process(delta): 
if $HBoxContainer/VBoxContainer/Button.is_hovered() == true:
    $HBoxContainer/VBoxContainer/Button.grab_focus()
func _on_Button_press():
get_tree().change_scene("res://text.tscn")

I cant seem to get the buttons to do anything. Any advice would sure help

in Engine by (12 points)

Is the function on_Button_press actually connected to the button's pressed signal through code or the editor (you should see a green icon next to it if it was connected through the editor).

1 Answer

0 votes

If there is a node covering the button and the mouse filter of the node is set to stop it will block the mouse from clicking the button.
So the solution is to set the mouse filter to ignore.

by (290 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.