aboutsummaryrefslogtreecommitdiff
path: root/client/gui/menus
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-09-27 22:07:11 +0200
committermetamuffin <metamuffin@disroot.org>2025-09-27 22:07:19 +0200
commit46897ebdbe69145d6e9290c474c8ac426372226e (patch)
treee23e38de34c8c80f2b691228da201db828d09dac /client/gui/menus
parent481ca4dc8d03d2e2b10fffbed5fa8ce58f7291bb (diff)
downloadhurrycurry-46897ebdbe69145d6e9290c474c8ac426372226e.tar
hurrycurry-46897ebdbe69145d6e9290c474c8ac426372226e.tar.bz2
hurrycurry-46897ebdbe69145d6e9290c474c8ac426372226e.tar.zst
Chat system messages
Diffstat (limited to 'client/gui/menus')
-rw-r--r--client/gui/menus/game.gd12
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