I cant get my pause menu to open
my code:
extends Control
var pause_menu: Control
func _ready():
pause_menu = get_node(".") as Control
if Input.is_action_pressed("ui_cancel"):
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
pause_menu.visible = true
func _on_resume_pressed():
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
pause_menu.visible = false
func _on_optsions_pressed():
print("NO!?")
func _on_quit_pressed():
get_tree().change_scene_to_file("res://scenes/menus/main_menu.tscn")