From 81cc6f1d22677dd4a60aa9377c91b291bf10e523 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 27 Apr 2024 20:06:49 +0200 Subject: update --- Scenes/UI/Menu.gd | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Scenes/UI') diff --git a/Scenes/UI/Menu.gd b/Scenes/UI/Menu.gd index 534b50c..ee320a2 100644 --- a/Scenes/UI/Menu.gd +++ b/Scenes/UI/Menu.gd @@ -11,17 +11,21 @@ func _ready(): self._ready_system() -func _input(_event: InputEvent): - if Input.is_action_just_pressed("ui_menu"): +func _input(event: InputEvent): + if event.is_action_pressed("ui_menu"): + print(Global.player.position) + print("pressed") if get_tree().paused: # game is paused self.close_menu() + print("was paused") else: # game is running self.open_menu() + print("was running") - if Input.is_action_pressed("ui_menu_left"): + if event.is_action_pressed("ui_menu_left"): if get_current_tab() > 0: set_current_tab(get_current_tab() - 1) - if Input.is_action_pressed("ui_menu_right"): + if event.is_action_pressed("ui_menu_right"): if get_current_tab() < get_tab_count() - 1: set_current_tab(get_current_tab() + 1) -- cgit v1.2.3