From 01ecc56dd453163dfc6f80f391e5f2e40f43d33a Mon Sep 17 00:00:00 2001 From: jkboy Date: Fri, 16 May 2025 21:50:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=86dialogue=20UI?= =?UTF-8?q?=E7=9A=84=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UI/popup/dialogue.tscn | 52 ++++++++++--------- .../task_development/main_plan/main_plan.gd | 2 +- .../npc_select_1/npc_select_1.gd | 4 ++ UI/ui_framework.gd | 1 - 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/UI/popup/dialogue.tscn b/UI/popup/dialogue.tscn index 95ebcf7..d077470 100644 --- a/UI/popup/dialogue.tscn +++ b/UI/popup/dialogue.tscn @@ -52,17 +52,17 @@ grow_vertical = 2 script = ExtResource("1_ilhgc") [node name="Part_1" type="NinePatchRect" parent="."] -custom_minimum_size = Vector2(360, 40) +custom_minimum_size = Vector2(500, 44) layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -180.0 -offset_top = -159.0 -offset_right = 180.0 -offset_bottom = -119.0 +offset_left = -250.0 +offset_top = -203.0 +offset_right = 250.0 +offset_bottom = -159.0 grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("2_ilhgc") @@ -79,29 +79,29 @@ anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -27.0 -offset_top = -13.0 -offset_right = 27.0 -offset_bottom = 13.0 +offset_left = -40.5 +offset_top = -11.7813 +offset_right = 40.5 +offset_bottom = 15.7813 grow_horizontal = 2 grow_vertical = 2 theme_override_colors/font_color = Color(0, 0, 0, 1) theme_override_fonts/font = ExtResource("3_ilhgc") -theme_override_font_sizes/font_size = 22 +theme_override_font_sizes/font_size = 27 text = "对话框" [node name="Part_2" type="NinePatchRect" parent="."] -custom_minimum_size = Vector2(360, 200) +custom_minimum_size = Vector2(500, 310) layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -180.0 -offset_top = -119.0 -offset_right = 180.0 -offset_bottom = 81.0 +offset_left = -250.0 +offset_top = -159.0 +offset_right = 250.0 +offset_bottom = 151.0 grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("2_ilhgc") @@ -112,17 +112,17 @@ patch_margin_right = 8 patch_margin_bottom = 32 [node name="Part_3" type="NinePatchRect" parent="Part_2"] -custom_minimum_size = Vector2(320, 100) +custom_minimum_size = Vector2(460, 100) layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -140.0 -offset_top = -88.0 -offset_right = 140.0 -offset_bottom = 52.0 +offset_left = -230.0 +offset_top = -135.0 +offset_right = 230.0 +offset_bottom = 98.0 grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("2_ilhgc") @@ -140,15 +140,16 @@ anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -131.0 -offset_top = -57.0 -offset_right = 129.0 -offset_bottom = 53.0 +offset_left = -206.0 +offset_top = -96.5 +offset_right = 208.0 +offset_bottom = 83.5 grow_horizontal = 2 grow_vertical = 2 theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_constants/line_spacing = 7 theme_override_fonts/font = ExtResource("3_ilhgc") -theme_override_font_sizes/font_size = 18 +theme_override_font_sizes/font_size = 20 text = "游戏杂志最新刊已发行。游戏杂志最新刊已发行。游戏杂志最新刊已发行。游戏杂志最新刊已发行。游戏杂志最新刊已发行。" autowrap_mode = 1 @@ -190,3 +191,4 @@ offset_right = -11.0 offset_bottom = -4.0 grow_horizontal = 0 grow_vertical = 0 +stretch_mode = 5 diff --git a/UI/popup/task_development/main_plan/main_plan.gd b/UI/popup/task_development/main_plan/main_plan.gd index 383988b..06f4bde 100644 --- a/UI/popup/task_development/main_plan/main_plan.gd +++ b/UI/popup/task_development/main_plan/main_plan.gd @@ -38,7 +38,7 @@ func _on_page_activated(): super._on_page_activated() # 调用父类的激活逻辑 if GameState.get_value("is_on_task"): - self.show() + self_modulate.a = 0.0 go_to_child_page(dialogue_secretary) return diff --git a/UI/popup/task_development/npc_select_1/npc_select_1.gd b/UI/popup/task_development/npc_select_1/npc_select_1.gd index b1dd53b..aa9a9fd 100644 --- a/UI/popup/task_development/npc_select_1/npc_select_1.gd +++ b/UI/popup/task_development/npc_select_1/npc_select_1.gd @@ -284,4 +284,8 @@ func _on_confirm_pressed() -> void: # 设置选中的NPC为关键环节负责人 set_main_data("关键环节负责人", selected_npc_key) + GameState.set_value("dialogue_npc", selected_npc_key) + + #设置任务状态开启 + GameState.set_value("is_on_task",true) go_next() # 进入下一个UI流程 diff --git a/UI/ui_framework.gd b/UI/ui_framework.gd index 31f1da3..a0dc47f 100644 --- a/UI/ui_framework.gd +++ b/UI/ui_framework.gd @@ -145,7 +145,6 @@ func _on_page_workflow_end_requested(is_confirm_and_trigger_action: bool): current_active_page = null GameState.set_value(gamestate_data_key,shared_workflow_data) - GameState.set_value("is_on_task",true) GameState.resume_game() self.hide() print("Main: UI Workflow finished and Main hidden.")