Deepen ancient briefing and dialogue UI
This commit is contained in:
@@ -2650,6 +2650,8 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
|
||||
_check_panel_style_frame(failures, scene.briefing_panel, "briefing panel", Color(0.20, 0.11, 0.045, 1.0), 10)
|
||||
_check_panel_style_fill(failures, scene.briefing_objective_panel, "briefing objective edict panel", Color(0.66, 0.52, 0.31, 0.995))
|
||||
_check_panel_style_frame(failures, scene.briefing_objective_panel, "briefing objective edict panel", Color(0.20, 0.11, 0.045, 1.0), 6)
|
||||
_check_panel_style_fill(failures, scene.briefing_camp_overview_panel, "briefing silk map panel", Color(0.54, 0.38, 0.18, 0.992))
|
||||
_check_panel_style_frame(failures, scene.briefing_camp_overview_panel, "briefing silk map panel", Color(0.43, 0.25, 0.095, 0.996), 4)
|
||||
_check_panel_style_fill(failures, scene.dialogue_panel, "dialogue panel", Color(0.070, 0.018, 0.010, 0.997))
|
||||
_check_panel_style_frame(failures, scene.dialogue_panel, "dialogue panel", Color(0.78, 0.58, 0.27, 1.0), 9)
|
||||
_check_panel_style_fill(failures, scene.dialogue_portrait_panel, "dialogue portrait panel", Color(0.035, 0.014, 0.008, 1.0))
|
||||
@@ -2660,11 +2662,33 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
|
||||
_check_seal_ribbon(failures, scene.result_seal_ribbon, "result seal ribbon")
|
||||
_check_bamboo_gutter_row(failures, scene.briefing_objective_panel, "briefing objective bamboo gutters")
|
||||
_check_bamboo_gutter_row(failures, scene.dialogue_text_panel, "dialogue scroll bamboo gutters")
|
||||
_check_edict_marker_stack(failures, scene.briefing_objective_panel, "briefing objective edict markers")
|
||||
_check_hanging_tassel(failures, scene.dialogue_left_tassel, "dialogue left tassel")
|
||||
_check_hanging_tassel(failures, scene.dialogue_right_tassel, "dialogue right tassel")
|
||||
_check_dialogue_column_budget(failures, scene)
|
||||
if scene.dialogue_continue_button == null or scene.dialogue_continue_button.text != "다음 죽간":
|
||||
failures.append("dialogue continue button should use ancient slip text")
|
||||
if scene.dialogue_previous_button == null or scene.dialogue_previous_button.text != "이전 죽간":
|
||||
failures.append("dialogue previous button should use ancient slip text")
|
||||
var localized_lines := scene._normalized_dialogue_lines([{"speaker": "Cao Cao", "display_speaker": "조조", "text": "군령을 전하라."}])
|
||||
if localized_lines.is_empty() or str((localized_lines[0] as Dictionary).get("speaker", "")) != "조조":
|
||||
failures.append("dialogue normalization should preserve display_speaker for localized names")
|
||||
else:
|
||||
scene.active_dialogue_lines = localized_lines
|
||||
scene.active_dialogue_index = 0
|
||||
scene._render_dialogue_line()
|
||||
if scene.dialogue_speaker_label == null or scene.dialogue_speaker_label.text != "조조":
|
||||
failures.append("dialogue speaker label should render localized display_speaker")
|
||||
scene._hide_dialogue_panel()
|
||||
var right_lines := scene._normalized_dialogue_lines([{"speaker": "Xiahou Dun", "display_speaker": "하후돈", "side": "right", "text": "우익에서 응하겠습니다."}])
|
||||
if right_lines.is_empty():
|
||||
failures.append("dialogue normalization should keep right-side lines")
|
||||
else:
|
||||
scene.active_dialogue_lines = right_lines
|
||||
scene.active_dialogue_index = 0
|
||||
scene._render_dialogue_line()
|
||||
_check_right_side_dialogue_layout(failures, scene)
|
||||
scene._hide_dialogue_panel()
|
||||
if scene._ui_font(false) == null:
|
||||
failures.append("ancient UI regular font should load from project assets")
|
||||
if scene._ui_font(true) == null:
|
||||
@@ -2748,6 +2772,57 @@ func _check_bamboo_gutter(failures: Array[String], node: Node, label: String) ->
|
||||
failures.append("%s should use three bamboo slips" % label)
|
||||
|
||||
|
||||
func _check_edict_marker_stack(failures: Array[String], panel: PanelContainer, label: String) -> void:
|
||||
if panel == null or panel.get_child_count() <= 0:
|
||||
failures.append("%s missing row" % label)
|
||||
return
|
||||
var row := panel.get_child(0) as HBoxContainer
|
||||
if row == null or row.get_child_count() < 5:
|
||||
failures.append("%s should include side marker stacks" % label)
|
||||
return
|
||||
_check_marker_stack(failures, row.get_child(1), "%s left stack" % label)
|
||||
_check_marker_stack(failures, row.get_child(row.get_child_count() - 2), "%s right stack" % label)
|
||||
|
||||
|
||||
func _check_marker_stack(failures: Array[String], node: Node, label: String) -> void:
|
||||
var stack := node as VBoxContainer
|
||||
if stack == null:
|
||||
failures.append("%s should be a vertical seal stack" % label)
|
||||
return
|
||||
if stack.get_child_count() < 2:
|
||||
failures.append("%s should include multiple seal plaques" % label)
|
||||
|
||||
|
||||
func _check_hanging_tassel(failures: Array[String], tassel: VBoxContainer, label: String) -> void:
|
||||
if tassel == null:
|
||||
failures.append("%s missing" % label)
|
||||
return
|
||||
if tassel.get_child_count() != 3:
|
||||
failures.append("%s should use top seal, hanging cords, and bottom seal" % label)
|
||||
return
|
||||
var cords := tassel.get_child(1) as HBoxContainer
|
||||
if cords == null or cords.get_child_count() != 2:
|
||||
failures.append("%s should include two hanging cord strips" % label)
|
||||
|
||||
|
||||
func _check_right_side_dialogue_layout(failures: Array[String], scene) -> void:
|
||||
if scene.dialogue_row == null or scene.dialogue_row.get_child_count() != 4:
|
||||
failures.append("right-side dialogue should keep four major columns")
|
||||
return
|
||||
if scene.dialogue_row.get_child(0) != scene.dialogue_left_tassel:
|
||||
failures.append("right-side dialogue should keep the left tassel at the outer edge")
|
||||
if scene.dialogue_row.get_child(1) != scene.dialogue_column:
|
||||
failures.append("right-side dialogue should place speech scroll before the portrait")
|
||||
if scene.dialogue_row.get_child(2) != scene.dialogue_portrait_panel:
|
||||
failures.append("right-side dialogue should place portrait near the right tassel")
|
||||
if scene.dialogue_row.get_child(3) != scene.dialogue_right_tassel:
|
||||
failures.append("right-side dialogue should keep the right tassel at the outer edge")
|
||||
if scene.dialogue_speaker_label == null or scene.dialogue_speaker_label.horizontal_alignment != HORIZONTAL_ALIGNMENT_RIGHT:
|
||||
failures.append("right-side dialogue speaker label should align right")
|
||||
if scene.dialogue_text_label == null or scene.dialogue_text_label.horizontal_alignment != HORIZONTAL_ALIGNMENT_RIGHT:
|
||||
failures.append("right-side dialogue text should align right")
|
||||
|
||||
|
||||
func _check_dialogue_column_budget(failures: Array[String], scene) -> void:
|
||||
if scene.dialogue_column == null:
|
||||
failures.append("dialogue column missing")
|
||||
|
||||
Reference in New Issue
Block a user