summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2022-10-30 00:57:26 -0400
committerMalfurious <m@lfurio.us>2022-10-30 00:57:26 -0400
commitacaea7bf1657f02670c2551357be178b0bf16f75 (patch)
tree57519e2a84beb60ce726075420997b6cd03ba12d
parent31bc7653eb89688b9890523e1f2b39cc867837fc (diff)
downloadproject-s-acaea7bf1657f02670c2551357be178b0bf16f75.tar.gz
project-s-acaea7bf1657f02670c2551357be178b0bf16f75.zip
Add menu placeholder hotkey
It would be nice to eventually use Escape to open/close an in-game menu. For now, use the key as a shortcut to close the application. Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r--assets/view_model/ViewModel.gd3
-rw-r--r--project.godot5
2 files changed, 8 insertions, 0 deletions
diff --git a/assets/view_model/ViewModel.gd b/assets/view_model/ViewModel.gd
index 6d42a5a..949bfab 100644
--- a/assets/view_model/ViewModel.gd
+++ b/assets/view_model/ViewModel.gd
@@ -68,6 +68,9 @@ func _physics_process(delta):
if Input.is_action_just_pressed("ping"):
cycle_parent()
+ if Input.is_action_just_pressed("menu"):
+ get_tree().quit()
+
func _unhandled_input(event):
# Implement mouse aim direction
if event is InputEventMouseMotion:
diff --git a/project.godot b/project.godot
index 7fadb87..2bebce0 100644
--- a/project.godot
+++ b/project.godot
@@ -138,6 +138,11 @@ info={
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
+menu={
+"deadzone": 0.5,
+"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
+ ]
+}
[physics]