diff options
Diffstat (limited to 'client/gui/menus/game.gd')
-rw-r--r-- | client/gui/menus/game.gd | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/client/gui/menus/game.gd b/client/gui/menus/game.gd index 0466d287..e0ab5de7 100644 --- a/client/gui/menus/game.gd +++ b/client/gui/menus/game.gd @@ -25,13 +25,12 @@ func _ready(): get_tree().get_root().go_back_requested.connect(open_ingame_menu) super() transition.set_loading_text(tr("c.menu.game.connecting")) - Settings.hook_changed_init("gameplay.first_person", "mouse_lock", func (_a): update_mouse_capture()) func _input(_event): if Input.is_action_just_pressed("ui_menu"): open_ingame_menu() - + if Input.is_action_just_pressed("chat"): Sound.play_click() chat_preview.visible = false @@ -39,13 +38,17 @@ func _input(_event): chat_preview.visible = true if Input.is_action_just_pressed("screenshot"): - get_viewport().get_texture().get_image().save_png(get_shot_path("screenshot-%s.png")) + var path = get_shot_path("screenshot-%s.png") + get_viewport().get_texture().get_image().save_png(path) + game.system_message(tr("c.system_message.screenshot_saved").format({"path": path})) if Input.is_action_just_pressed("sceneshot"): + var path = get_shot_path("sceneshot-%s.glb") 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")) + doc.write_to_filesystem(state, path) + game.system_message(tr("c.system_message.sceneshot_saved").format({"path": path})) if Input.is_action_just_pressed("toggle_first_person"): Settings.write("gameplay.first_person", not Settings.read("gameplay.first_person")) @@ -61,6 +64,7 @@ func _menu_cover(state): game.follow_camera.disable_input_menu = state game.follow_camera.update_disable_input() update_mouse_capture() + func _menu_exit(): super() Input.mouse_mode = Input.MOUSE_MODE_VISIBLE |