How do I activate my continue button?

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

Hello guys I’m doing a pause menu. my codes here:

extends CanvasLayer


func _input(event: InputEvent) -> void:
	if event.is_action_pressed("pause"):
		get_tree().paused = !get_tree().paused
		print(get_tree().paused)
		$".".visible = true
	pass

My continue button isnt workin because I paused my game. And I want to add code activating my continue , back to menu etc. buttons. How can I ?
(Im new on english and develoop game)

one more thing
how can use my continue button ?

extends Button



func _on_continue_Button_pause_pressed():
	x
	$"../..".visible = false
	pass # Replace with function body.

I want fill x with continue func

:bust_in_silhouette: Reply From: Gluon

In the editor if you look at your button you will find in the inspector right at the bottom you will find a pause mode, this will probably be set to inherit, change this too process and then it will work when you pause the game.

:bust_in_silhouette: Reply From: SnapCracklins

It paused because when you use get_tree().paused, it pauses everything in the SceneTree UNLESS that object is set to Process on Pause Mode. Go to whatever object needs to move/activate while paused, go to the Inspector on right and set it to Process and it should work.

Process Mode

Pssst. Also, if you’re using any Control elements that cover the screen (like a ColorRect) make sure your mouse mode is set to pass.