Godsim/scripts/ingame_menu.gd

7 lines
223 B
GDScript

extends Control
func _physics_process(delta):
if Input.is_action_just_pressed("ingame_menu"):
self.visible = !self.visible
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE if self.visible else Input.MOUSE_MODE_CAPTURED)