diff options
Diffstat (limited to 'Scenes/UI/Menu.gd')
-rw-r--r-- | Scenes/UI/Menu.gd | 12 |
1 files changed, 8 insertions, 4 deletions
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) |