Simplify title menu layout
This commit is contained in:
@@ -72,6 +72,8 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
|
||||
failures.append("title screen should show Cao Cao portrait art")
|
||||
if scene.title_panel == null or scene.title_panel.position.x > 100.0:
|
||||
failures.append("title menu panel should sit on the left side of the cinematic title screen")
|
||||
elif scene.title_portrait_texture_rect != null and scene.title_panel.position.x + scene.title_panel.size.x >= scene.title_portrait_texture_rect.position.x:
|
||||
failures.append("title menu commands should stay clearly to the left of Cao Cao portrait")
|
||||
if scene.title_menu_surface_texture_rect == null or scene.title_menu_surface_texture_rect.texture == null:
|
||||
failures.append("title screen should use a generated command-board surface behind the menu")
|
||||
else:
|
||||
@@ -79,8 +81,8 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
|
||||
failures.append("title command board should carry generated surface metadata")
|
||||
if scene.title_menu_surface_texture_rect.texture.get_width() < 1024 or scene.title_menu_surface_texture_rect.texture.get_height() < 1024:
|
||||
failures.append("title command board should keep high-resolution generated pixels")
|
||||
if scene.title_menu_surface_texture_rect.custom_minimum_size.y < 860.0:
|
||||
failures.append("title command board should extend beyond the viewport for a full ceremonial frame")
|
||||
if scene.title_menu_surface_texture_rect.custom_minimum_size.x > 620.0 or scene.title_menu_surface_texture_rect.custom_minimum_size.y > 660.0:
|
||||
failures.append("title command board should stay compact so the three commands are not clipped: %s" % str(scene.title_menu_surface_texture_rect.custom_minimum_size))
|
||||
if scene.title_panel != null and str(scene.title_panel.get_meta("panel_style_variant", "")) != "transparent_overlay":
|
||||
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 != "조조전":
|
||||
@@ -88,71 +90,47 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
|
||||
var title_story_feature: Node = null
|
||||
if scene.title_screen_root != null:
|
||||
title_story_feature = scene.title_screen_root.find_child("TitleStoryFeaturePanel", true, false)
|
||||
if title_story_feature == null:
|
||||
failures.append("title screen should feature a large generated opening story panel")
|
||||
else:
|
||||
var feature_image := title_story_feature.find_child("TitleStoryFeatureImage", true, false) as TextureRect
|
||||
var feature_caption := title_story_feature.find_child("TitleStoryFeatureCaption", true, false) as PanelContainer
|
||||
var feature_title := title_story_feature.find_child("TitleStoryFeatureTitle", true, false) as Label
|
||||
var feature_body := title_story_feature.find_child("TitleStoryFeatureBody", true, false) as Label
|
||||
if feature_image == null or feature_image.texture == null:
|
||||
failures.append("title story feature should load generated opening artwork")
|
||||
elif feature_image.custom_minimum_size.x < 600.0 or feature_image.custom_minimum_size.y < 160.0:
|
||||
failures.append("title story feature should lead with a wide generated artwork frame: %s" % str(feature_image.custom_minimum_size))
|
||||
if feature_caption == null or not bool(feature_caption.get_meta("generated_panel_texture", false)):
|
||||
failures.append("title story feature should use a generated caption command plate")
|
||||
if feature_title == null or feature_title.text != "황건의 난":
|
||||
failures.append("title story feature should name the first opening beat")
|
||||
if feature_body == null or not feature_body.text.contains("조조") or not feature_body.text.contains("황건의 난"):
|
||||
failures.append("title story feature should summarize the first opening beat with a short Korean teaser")
|
||||
var feature_frame := title_story_feature.find_child("TitleStoryFeatureImageFrame", true, false) as PanelContainer
|
||||
if feature_frame == null or not bool(feature_frame.get_meta("generated_panel_texture", false)):
|
||||
failures.append("title story feature artwork should sit inside a generated frame")
|
||||
if title_story_feature != null:
|
||||
failures.append("title screen should not crowd the first menu with opening story feature artwork")
|
||||
var title_story_strip: Node = null
|
||||
if scene.title_screen_root != null:
|
||||
title_story_strip = scene.title_screen_root.find_child("TitleStoryPreviewStrip", true, false)
|
||||
if title_story_strip == null:
|
||||
failures.append("title screen should preview the four generated opening story panels")
|
||||
else:
|
||||
var story_cards: Array = title_story_strip.find_children("TitleStoryPreviewCard*", "", true, false)
|
||||
if story_cards.size() != 4:
|
||||
failures.append("title story preview should expose four story beats: %d" % story_cards.size())
|
||||
for story_card in story_cards:
|
||||
if not story_card is PanelContainer:
|
||||
failures.append("title story preview cards should use generated panel frames")
|
||||
elif not bool((story_card as PanelContainer).get_meta("generated_panel_texture", false)):
|
||||
failures.append("title story preview card should use a generated panel texture")
|
||||
var story_frame := (story_card as Node).find_child("TitleStoryPreviewImageFrame", true, false) as PanelContainer
|
||||
var story_image := (story_card as Node).find_child("TitleStoryPreviewImage", true, false) as TextureRect
|
||||
var story_label := (story_card as Node).find_child("TitleStoryPreviewLabel", true, false) as Label
|
||||
if story_frame == null or not bool(story_frame.get_meta("generated_panel_texture", false)):
|
||||
failures.append("title story preview image should sit inside a generated frame")
|
||||
if story_image == null or story_image.texture == null:
|
||||
failures.append("title story preview card should load generated artwork")
|
||||
elif story_image.custom_minimum_size.y < 64.0:
|
||||
failures.append("title story preview image should stay large enough to read as artwork: %s" % str(story_image.custom_minimum_size))
|
||||
if story_label == null or story_label.text.strip_edges().is_empty():
|
||||
failures.append("title story preview card should name its story beat")
|
||||
if title_story_strip != null:
|
||||
failures.append("title screen should keep opening story previews inside the prologue, not the first menu")
|
||||
if scene.briefing_panel == null or scene.briefing_panel.visible:
|
||||
failures.append("briefing should stay hidden behind the title screen")
|
||||
if scene.title_start_button == null or scene.title_start_button.text != "처음부터 시작":
|
||||
failures.append("title screen should expose Start from Beginning")
|
||||
if scene.title_start_button == null or scene.title_start_button.text != "처음부터":
|
||||
failures.append("title screen should expose `처음부터`")
|
||||
else:
|
||||
if not scene.title_start_button.visible:
|
||||
failures.append("title start command should be visible on first screen")
|
||||
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_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 Game Load")
|
||||
if scene.title_load_button == null or scene.title_load_button.text != "로드하기":
|
||||
failures.append("title screen should expose `로드하기`")
|
||||
elif not scene.title_load_button.disabled:
|
||||
failures.append("Game Load should be disabled when no save exists")
|
||||
failures.append("Load should be disabled when no save exists")
|
||||
else:
|
||||
if not scene.title_load_button.visible:
|
||||
failures.append("title load command should be visible on first screen")
|
||||
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_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")
|
||||
elif scene.title_load_panel.visible:
|
||||
failures.append("load-slot selection panel should stay hidden until Game Load is pressed")
|
||||
if scene.title_settings_button == null or scene.title_settings_button.text != "환경 설정":
|
||||
failures.append("title screen should expose Settings")
|
||||
if scene.title_settings_button == null or scene.title_settings_button.text != "환경설정":
|
||||
failures.append("title screen should expose `환경설정`")
|
||||
else:
|
||||
if not scene.title_settings_button.visible:
|
||||
failures.append("title settings command should be visible on first screen")
|
||||
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_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")
|
||||
|
||||
scene._on_title_settings_pressed()
|
||||
if scene.title_settings_panel == null or not scene.title_settings_panel.visible:
|
||||
@@ -194,7 +172,7 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
|
||||
scene._on_title_audio_reset_pressed()
|
||||
if not scene.title_bgm_enabled or not scene.title_sfx_enabled:
|
||||
failures.append("title audio recovery should re-enable BGM and SFX")
|
||||
if scene.title_bgm_volume_percent != 100 or scene.title_sfx_volume_percent != 100:
|
||||
if scene.title_bgm_volume_percent != BattleSceneScript.DEFAULT_AUDIO_VOLUME_PERCENT or scene.title_sfx_volume_percent != BattleSceneScript.DEFAULT_AUDIO_VOLUME_PERCENT:
|
||||
failures.append("title audio recovery should restore audible volume defaults")
|
||||
if scene.bgm_player == null or scene.bgm_player.stream == null or scene.current_bgm_key.is_empty():
|
||||
failures.append("title audio recovery should leave a playable BGM stream selected")
|
||||
@@ -373,7 +351,7 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void:
|
||||
scene._on_settings_audio_reset_pressed()
|
||||
if not scene.title_bgm_enabled or not scene.title_sfx_enabled:
|
||||
failures.append("in-game audio recovery should re-enable BGM and SFX")
|
||||
if scene.title_bgm_volume_percent != 100 or scene.title_sfx_volume_percent != 100:
|
||||
if scene.title_bgm_volume_percent != BattleSceneScript.DEFAULT_AUDIO_VOLUME_PERCENT or scene.title_sfx_volume_percent != BattleSceneScript.DEFAULT_AUDIO_VOLUME_PERCENT:
|
||||
failures.append("in-game audio recovery should restore audible volume defaults")
|
||||
scene._hide_settings_panel()
|
||||
scene._on_new_campaign_pressed()
|
||||
|
||||
@@ -3273,11 +3273,8 @@ func _check_core_text_visibility(failures: Array[String]) -> void:
|
||||
_check_readable_text_control(failures, scene.title_caption_label, "title campaign name", 26)
|
||||
_check_readable_text_control(failures, scene.title_subtitle_label, "title subtitle", 13)
|
||||
var title_feature: Node = scene.title_screen_root.find_child("TitleStoryFeaturePanel", true, false) if scene.title_screen_root != null else null
|
||||
if title_feature == null:
|
||||
failures.append("title text visibility check could not find story feature panel")
|
||||
else:
|
||||
_check_readable_text_control(failures, title_feature.find_child("TitleStoryFeatureTitle", true, false) as Control, "title story feature title", 14)
|
||||
_check_readable_text_control(failures, title_feature.find_child("TitleStoryFeatureBody", true, false) as Control, "title story feature body", 10)
|
||||
if title_feature != null:
|
||||
failures.append("title text visibility should keep story artwork out of the first menu")
|
||||
_check_readable_text_control(failures, scene.title_start_button, "title start button", 12)
|
||||
_check_readable_text_control(failures, scene.title_load_button, "title load button", 12)
|
||||
_check_readable_text_control(failures, scene.title_settings_button, "title settings button", 12)
|
||||
|
||||
Reference in New Issue
Block a user