Improve title and opening text readability

This commit is contained in:
2026-06-20 13:56:27 +09:00
parent f111c9c48f
commit 7fb27f29fc
5 changed files with 124 additions and 38 deletions

View File

@@ -100,6 +100,10 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
failures.append("title menu panel should be a transparent content layer over generated art")
if scene.title_caption_label == null or scene.title_caption_label.text != "조조전":
failures.append("title screen should present the campaign title in Korean")
else:
_check_title_text_contrast(failures, scene.title_caption_label, "title caption", 0.88, 3, 34)
if scene.title_subtitle_label != null:
_check_title_text_contrast(failures, scene.title_subtitle_label, "title subtitle", 0.66, 3, 17)
var title_story_feature: Node = null
if scene.title_screen_root != null:
title_story_feature = scene.title_screen_root.find_child("TitleStoryFeaturePanel", true, false)
@@ -120,6 +124,7 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
if scene.title_start_button.custom_minimum_size.y < 54.0:
failures.append("title start command should be tall enough to read clearly")
_check_title_command_fit(failures, scene.title_start_button, "title start")
_check_title_button_text_contrast(failures, scene.title_start_button, "title start")
_check_title_menu_button_art(failures, scene.title_start_button, "new", "title start")
if scene.title_load_button == null or scene.title_load_button.text != "로드하기":
failures.append("title screen should expose `로드하기`")
@@ -131,6 +136,7 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
if scene.title_load_button.custom_minimum_size.y < 54.0:
failures.append("title load command should be tall enough to read clearly")
_check_title_command_fit(failures, scene.title_load_button, "title load")
_check_title_button_text_contrast(failures, scene.title_load_button, "title load")
_check_title_menu_button_art(failures, scene.title_load_button, "load", "title load")
if scene.title_load_panel == null:
failures.append("title screen should create a load-slot selection panel")
@@ -144,6 +150,7 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
if scene.title_settings_button.custom_minimum_size.y < 54.0:
failures.append("title settings command should be tall enough to read clearly")
_check_title_command_fit(failures, scene.title_settings_button, "title settings")
_check_title_button_text_contrast(failures, scene.title_settings_button, "title settings")
_check_title_menu_button_art(failures, scene.title_settings_button, "settings", "title settings")
if scene.title_settings_back_button != null and scene.title_settings_back_button.visible:
failures.append("title settings back command should stay hidden until settings are open")
@@ -467,6 +474,37 @@ func _check_title_command_fit(failures: Array[String], button: Button, context:
failures.append("%s combined width should fit inside the title menu, got %.1f" % [context, combined.x])
func _check_title_button_text_contrast(failures: Array[String], button: Button, context: String) -> void:
if button == null:
return
_check_title_text_contrast(failures, button, "%s text" % context, 0.88, 3, 18)
var disabled_color: Color = button.get_theme_color("font_disabled_color")
if disabled_color.get_luminance() < 0.70:
failures.append("%s disabled text should remain readable, luminance %.2f" % [context, disabled_color.get_luminance()])
func _check_title_text_contrast(
failures: Array[String],
control: Control,
context: String,
min_luminance: float,
min_outline: int,
min_font_size: int
) -> void:
if control == null:
failures.append("%s missing" % context)
return
var font_color: Color = control.get_theme_color("font_color")
if font_color.get_luminance() < min_luminance:
failures.append("%s should use bright readable text, luminance %.2f" % [context, font_color.get_luminance()])
var outline_size := control.get_theme_constant("outline_size")
if outline_size < min_outline:
failures.append("%s should keep a strong outline, got %d" % [context, outline_size])
var font_size := control.get_theme_font_size("font_size")
if font_size < min_font_size:
failures.append("%s font should be large enough to read, got %d" % [context, font_size])
func _check_bgm_stream_quality(failures: Array[String], stream: AudioStream, label: String, minimum_length: float) -> void:
if stream == null:
failures.append("%s BGM stream should load before playback" % label)