diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/gui/menus/game.gd | 4 | ||||
-rw-r--r-- | client/project.godot | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/client/gui/menus/game.gd b/client/gui/menus/game.gd index fef9c721..a730e385 100644 --- a/client/gui/menus/game.gd +++ b/client/gui/menus/game.gd @@ -38,12 +38,16 @@ func _input(_event): if Input.is_action_just_pressed("screenshot"): get_viewport().get_texture().get_image().save_png(get_shot_path("screenshot-%s.png")) + if Input.is_action_just_pressed("sceneshot"): var doc := GLTFDocument.new() var state := GLTFState.new() doc.append_from_scene(game, state) doc.write_to_filesystem(state, get_shot_path("sceneshot-%s.glb")) + if Input.is_action_just_pressed("toggle_first_person"): + Settings.write("gameplay.first_person", not Settings.read("gameplay.first_person")) + func get_shot_path(template: String) -> String: var path = Settings.read("gameplay.screenshot_path") if path == "": path = "user://" diff --git a/client/project.godot b/client/project.godot index b012f959..16557b08 100644 --- a/client/project.godot +++ b/client/project.godot @@ -242,6 +242,11 @@ sceneshot={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194335,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] } +toggle_first_person={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194336,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} [input_devices] |