show_center_notification 延长

This commit is contained in:
cakipaul 2025-07-30 20:59:22 +08:00
parent df174e3182
commit 4f684f812f
5 changed files with 11 additions and 6 deletions

View File

@ -30,7 +30,8 @@ ui_auto_saved,自动保存成功,,,,,Auto save successful
ui_notify_important_item_update,重要物品已更新,,,,,Important items updated
ui_notify_note_update,线索笔记已更新,,,,,Clue notes updated
ui_notify_mem_update,回忆已更新,,,,,Memories updated
ui_center_notify_press_e_to_interact,按 E 可与场景互动,,,,,Press E to interact
ui_center_notify_a_d_to_move,按 E 可与场景互动,,,,,Press E to interact
ui_center_notify_press_e_to_interact,按 A/D 可左右移动,,,,,Press A/D to Move
ui_center_notify_press_q_to_exit,按 Q 可退出,,,,,Press Q to exit
ui_center_notify_use_prop,按 E 使用道具,,,,,Press E to use item
ui_center_notify_check_note,按 N 查看线索笔记,,,,,Press N to check clue notes

1 keys zh_CN _character _notes _tags zh_SH en
30 ui_notify_important_item_update 重要物品已更新 Important items updated
31 ui_notify_note_update 线索笔记已更新 Clue notes updated
32 ui_notify_mem_update 回忆已更新 Memories updated
33 ui_center_notify_press_e_to_interact ui_center_notify_a_d_to_move 按 E 可与场景互动 Press E to interact
34 ui_center_notify_press_e_to_interact 按 A/D 可左右移动 Press A/D to Move
35 ui_center_notify_press_q_to_exit 按 Q 可退出 Press Q to exit
36 ui_center_notify_use_prop 按 E 使用道具 Press E to use item
37 ui_center_notify_check_note 按 N 查看线索笔记 Press N to check clue notes

View File

@ -39,6 +39,7 @@
回忆已更新 [ID:ui_notify_mem_update]
按 A/D 可左右移动 [ID:ui_center_notify_a_d_to_move]
按 E 可与场景互动 [ID:ui_center_notify_press_e_to_interact]
按 Q 可退出 [ID:ui_center_notify_press_q_to_exit]
按 E 使用道具 [ID:ui_center_notify_use_prop]

View File

@ -271,10 +271,10 @@ func pop_notification(translation_key: String, number := 1) -> void:
printerr("pop_notification: Notification node not found")
func pop_center_notification(translation_key: String) -> void:
func pop_center_notification(translation_key: String, duration := 4.0) -> void:
var notification_node = get_node_or_null("/root/Main/UILayer/Notification")
if notification_node:
notification_node.show_center_notification(tr(translation_key).replace("{br}", "\n"))
notification_node.show_center_notification(tr(translation_key).replace("{br}", "\n"), duration)
else:
printerr("pop_center_notification: Notification node not found")

View File

@ -54,7 +54,7 @@ func _on_ground_ready() -> void:
piano = $"../DeployLayer/钢琴"
if data["intro_played"]:
$"../DeployLayer/床".enabled = true
Util.timer(1.0, show_interact_help)
Util.timer(2.0, show_interact_help)
# 画框是否已经正位
data.frame_relocated = ambush.played and ambush.one_shot
# 禁用鸡毛掸子
@ -179,4 +179,7 @@ func _on_piano_interacted():
func show_interact_help():
SceneManager.pop_center_notification("ui_center_notify_a_d_to_move")
await Util.wait(5.0)
SceneManager.pop_center_notification("ui_center_notify_press_e_to_interact")

View File

@ -35,7 +35,7 @@ func show_center_texture(texture, duration := 3.0):
center_texture.texture = texture
var tween = create_tween()
tween.tween_property(center_texture, "modulate:a", 1, 0.4)
tween.tween_interval(max(0.1, duration - .8))
tween.tween_interval(max(0.1, duration - 0.8))
tween.tween_property(center_texture, "modulate:a", 0, 0.4)
@ -45,7 +45,7 @@ func show_center_notification(msg, duration := 3.0):
top_center_label.text = msg
var tween = create_tween()
tween.tween_property(top_center_label, "modulate:a", 1, 0.4)
tween.tween_interval(max(0.1, duration - .8))
tween.tween_interval(max(0.1, duration - 0.8))
tween.tween_property(top_center_label, "modulate:a", 0, 0.4)