summaryrefslogtreecommitdiff
path: root/Scenes/UI
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-04-27 20:06:49 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-04-27 20:06:49 +0200
commit81cc6f1d22677dd4a60aa9377c91b291bf10e523 (patch)
tree9c22712a9746ed0598a44be6e88727d021436860 /Scenes/UI
parentc8a316e4b8987dad963656a34665fa0e23dedcb1 (diff)
update
Diffstat (limited to 'Scenes/UI')
-rw-r--r--Scenes/UI/Menu.gd12
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)