From 482a88ba4a7083bc86923989f797af4c96228e9c Mon Sep 17 00:00:00 2001 From: Wickedness Date: Sat, 20 Jun 2026 17:20:53 +0900 Subject: [PATCH] Prevent briefing marker text clipping --- scripts/scenes/battle_scene.gd | 8 ++++---- tools/smoke_visual_assets.gd | 11 +++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/scenes/battle_scene.gd b/scripts/scenes/battle_scene.gd index 563db00..09bf8c3 100644 --- a/scripts/scenes/battle_scene.gd +++ b/scripts/scenes/battle_scene.gd @@ -12986,20 +12986,20 @@ func _make_briefing_tactical_marker_chip(entry: Dictionary) -> PanelContainer: var title_label := Label.new() title_label.custom_minimum_size = Vector2(78, 13) - title_label.clip_text = true - title_label.text = label_text title_label.tooltip_text = tooltip + title_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER title_label.mouse_filter = Control.MOUSE_FILTER_IGNORE _apply_label_style(title_label, UI_PARCHMENT_TEXT, 12) + _set_fitted_label_text(title_label, label_text, 12, 9, title_label.custom_minimum_size) text_column.add_child(title_label) var detail_label := Label.new() detail_label.custom_minimum_size = Vector2(78, 10) - detail_label.clip_text = true - detail_label.text = summary_text detail_label.tooltip_text = tooltip + detail_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER detail_label.mouse_filter = Control.MOUSE_FILTER_IGNORE _apply_label_style(detail_label, UI_OLD_BRONZE, 9) + _set_fitted_label_text(detail_label, summary_text, 9, 8, detail_label.custom_minimum_size) text_column.add_child(detail_label) _set_control_tree_tooltip(chip, tooltip) diff --git a/tools/smoke_visual_assets.gd b/tools/smoke_visual_assets.gd index 8269aa9..debf8cd 100644 --- a/tools/smoke_visual_assets.gd +++ b/tools/smoke_visual_assets.gd @@ -3987,6 +3987,7 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void: for expected_summary in ["앞줄 유인", "숨은 콩", "회복 보급"]: if not marker_visible_text.contains(expected_summary): failures.append("briefing tactical marker cards should show compact hint %s: %s" % [expected_summary, marker_visible_text]) + _check_no_clipped_labels(failures, scene.briefing_tactical_marker_list, "briefing tactical marker card text") scene._apply_panel_style(scene.result_panel, "result_victory_tablet") _check_panel_style_fill(failures, scene.result_panel, "victory result panel", Color(0.27, 0.34, 0.28, 0.997)) _check_panel_uses_generated_texture(failures, scene.result_panel, "victory result generated frame") @@ -4377,6 +4378,16 @@ func _check_rich_text_readability(failures: Array[String], label: RichTextLabel, failures.append("%s should use the project serif font" % context) +func _check_no_clipped_labels(failures: Array[String], root: Node, context: String) -> void: + if root == null: + failures.append("%s missing for clipped-label check" % context) + return + if root is Label and (root as Label).clip_text: + failures.append("%s should not hard-clip visible Korean text: %s" % [context, (root as Label).text]) + for child in root.get_children(): + _check_no_clipped_labels(failures, child, context) + + func _check_panel_uses_generated_ornament_texture(failures: Array[String], panel: PanelContainer, label: String) -> void: if panel == null: failures.append("%s missing" % label)