Fix opening prologue text visibility

This commit is contained in:
2026-06-20 13:26:58 +09:00
parent 31c07af556
commit cf3f7de3af
3 changed files with 101 additions and 40 deletions

View File

@@ -3871,28 +3871,38 @@ func _check_opening_prologue_presentation(failures: Array[String]) -> void:
if caption_panel == null:
failures.append("opening prologue should build a cinematic caption panel")
else:
if caption_panel.position.y < 500.0:
if caption_panel.position.y < 492.0:
failures.append("opening caption should sit low enough to let generated story art dominate: %s" % str(caption_panel.position))
if caption_panel.custom_minimum_size.y > 150.0:
failures.append("opening caption should stay compact instead of covering the story art: %s" % str(caption_panel.custom_minimum_size))
_check_panel_uses_generated_texture(failures, caption_panel, "opening cinematic caption generated frame")
if str(caption_panel.get_meta("panel_style_variant", "")) != "cinematic_caption" or str(caption_panel.get_meta("panel_texture_key", "")) != "lacquer":
failures.append("opening caption should use a dark generated lacquer surface so text stays visible")
if scene.opening_prologue_title_label != null and scene.opening_prologue_title_label.get_theme_color("font_color").get_luminance() < 0.55:
if caption_panel.custom_minimum_size.y < 160.0 or caption_panel.custom_minimum_size.y > 188.0:
failures.append("opening caption should be large enough for readable Korean without covering the story art: %s" % str(caption_panel.custom_minimum_size))
if str(caption_panel.get_meta("panel_style_variant", "")) != "cinematic_caption" or bool(caption_panel.get_meta("generated_panel_texture", true)):
failures.append("opening caption should use a flat high-contrast cinematic surface so text stays visible")
if caption_panel.z_index < 20:
failures.append("opening caption should render above the generated story image")
if scene.opening_prologue_title_label != null and scene.opening_prologue_title_label.get_theme_color("font_color").get_luminance() < 0.78:
failures.append("opening title should use bright text over the story image")
if scene.opening_prologue_body_label != null and scene.opening_prologue_body_label.get_theme_color("font_color").get_luminance() < 0.55:
failures.append("opening body should use bright text over the story image")
if scene.opening_prologue_body_label != null:
if scene.opening_prologue_body_label.get_theme_color("font_color").get_luminance() < 0.86:
failures.append("opening body should use bright text over the story image")
if scene.opening_prologue_body_label.custom_minimum_size.x < 730.0:
failures.append("opening body should be wide enough for Korean opening text: %s" % str(scene.opening_prologue_body_label.custom_minimum_size))
if scene.opening_prologue_body_label.get_theme_constant("outline_size") < 3:
failures.append("opening body should have a strong outline over generated art")
if scene.opening_prologue_next_button == null:
failures.append("opening prologue should expose a next button")
else:
if scene.opening_prologue_next_button.icon == null:
failures.append("opening next button should carry generated icon art")
if scene.opening_prologue_next_button.expand_icon or scene.opening_prologue_next_button.get_theme_constant("icon_max_width") > 28:
failures.append("opening next icon should stay capped so it cannot cover story text")
_check_button_uses_generated_surface(failures, scene.opening_prologue_next_button, "opening next")
if scene.opening_prologue_skip_button == null:
failures.append("opening prologue should expose a skip button")
else:
if scene.opening_prologue_skip_button.icon == null:
failures.append("opening skip button should carry generated icon art")
if scene.opening_prologue_skip_button.expand_icon or scene.opening_prologue_skip_button.get_theme_constant("icon_max_width") > 28:
failures.append("opening skip icon should stay capped so it cannot cover story text")
_check_button_uses_generated_surface(failures, scene.opening_prologue_skip_button, "opening skip")
for index in range(BattleSceneScript.OPENING_PROLOGUE_PAGES.size()):
scene.opening_prologue_index = index
@@ -3900,8 +3910,8 @@ func _check_opening_prologue_presentation(failures: Array[String]) -> void:
var body_text: String = scene.opening_prologue_body_label.text if scene.opening_prologue_body_label != null else ""
var body_area: Vector2 = scene.opening_prologue_body_label.custom_minimum_size if scene.opening_prologue_body_label != null else Vector2.ZERO
var body_size: int = scene.opening_prologue_body_label.get_theme_font_size("font_size") if scene.opening_prologue_body_label != null else 0
if body_size < 14 or body_size > 18:
failures.append("opening story body font should fit inside its compact caption range, got %d" % body_size)
if body_size < 17 or body_size > 20:
failures.append("opening story body font should stay readable inside the caption range, got %d" % body_size)
elif scene._estimated_wrapped_text_height(body_text, body_area.x, body_size) > body_area.y:
failures.append("opening story body should fit without clipping on page %d: size=%d area=%s" % [index + 1, body_size, str(body_area)])
if scene.opening_prologue_next_button != null: