From 91aa912c61e6d68784d60de5788c7f8296795b1c Mon Sep 17 00:00:00 2001 From: Wickedness Date: Sat, 20 Jun 2026 09:42:19 +0900 Subject: [PATCH] Make title prologue more image led --- scripts/scenes/battle_scene.gd | 85 ++++++++++++++++++++-------------- tools/smoke_title_menu.gd | 7 ++- 2 files changed, 54 insertions(+), 38 deletions(-) diff --git a/scripts/scenes/battle_scene.gd b/scripts/scenes/battle_scene.gd index 5d3d27d..f2c6c9c 100644 --- a/scripts/scenes/battle_scene.gd +++ b/scripts/scenes/battle_scene.gd @@ -152,16 +152,16 @@ const BRIEFING_TACTICAL_MARKER_MAX_COUNT := 3 const BRIEFING_FORCE_PREVIEW_ICON_SIZE := Vector2(32, 32) const BRIEFING_FORCE_PREVIEW_MAX_ALLIES := 2 const BRIEFING_FORCE_PREVIEW_MAX_ENEMY_TYPES := 4 -const TITLE_STORY_FEATURE_SIZE := Vector2(646, 196) -const TITLE_STORY_FEATURE_IMAGE_SIZE := Vector2(442, 166) -const TITLE_STORY_PREVIEW_STRIP_SIZE := Vector2(646, 116) -const TITLE_STORY_PREVIEW_CARD_SIZE := Vector2(148, 98) +const TITLE_STORY_FEATURE_SIZE := Vector2(646, 232) +const TITLE_STORY_FEATURE_IMAGE_SIZE := Vector2(620, 164) +const TITLE_STORY_PREVIEW_STRIP_SIZE := Vector2(646, 104) +const TITLE_STORY_PREVIEW_CARD_SIZE := Vector2(148, 90) const TITLE_STORY_PREVIEW_IMAGE_FRAME_SIZE := Vector2(140, 74) const TITLE_STORY_PREVIEW_IMAGE_SIZE := Vector2(132, 66) const TITLE_STORY_PREVIEW_LABEL_SIZE := Vector2(140, 16) -const OPENING_STORY_BEAT_CARD_SIZE := Vector2(128, 68) -const OPENING_STORY_BEAT_IMAGE_FRAME_SIZE := Vector2(118, 42) -const OPENING_STORY_BEAT_IMAGE_SIZE := Vector2(116, 34) +const OPENING_STORY_BEAT_CARD_SIZE := Vector2(136, 74) +const OPENING_STORY_BEAT_IMAGE_FRAME_SIZE := Vector2(126, 46) +const OPENING_STORY_BEAT_IMAGE_SIZE := Vector2(124, 38) const OPENING_STORY_BEAT_LABEL_SIZE := Vector2(96, 18) const COMMAND_NOTICE_ICON_SIZE := Vector2(32, 32) const COMMAND_NOTICE_MAX_ICONS := 4 @@ -2337,18 +2337,24 @@ func _make_title_story_feature_panel() -> PanelContainer: panel.tooltip_text = tooltip _apply_panel_style(panel, "transparent_overlay") - var row := HBoxContainer.new() - row.custom_minimum_size = Vector2(636, 176) - row.add_theme_constant_override("separation", 10) - row.tooltip_text = tooltip - panel.add_child(row) + var column := VBoxContainer.new() + column.custom_minimum_size = Vector2(630, 214) + column.add_theme_constant_override("separation", 6) + column.tooltip_text = tooltip + panel.add_child(column) var image_stack := PanelContainer.new() image_stack.name = "TitleStoryFeatureImageFrame" - image_stack.custom_minimum_size = Vector2(462, 176) + image_stack.custom_minimum_size = Vector2(630, 174) image_stack.tooltip_text = tooltip _apply_panel_style(image_stack, "caption") - row.add_child(image_stack) + var image_stack_style := image_stack.get_theme_stylebox("panel") + if image_stack_style != null: + image_stack_style.content_margin_left = 5 + image_stack_style.content_margin_right = 5 + image_stack_style.content_margin_top = 5 + image_stack_style.content_margin_bottom = 5 + column.add_child(image_stack) var image := TextureRect.new() image.name = "TitleStoryFeatureImage" @@ -2360,37 +2366,44 @@ func _make_title_story_feature_panel() -> PanelContainer: image.tooltip_text = tooltip image_stack.add_child(image) - var text_column := VBoxContainer.new() - text_column.custom_minimum_size = Vector2(164, 176) - text_column.size_flags_horizontal = Control.SIZE_EXPAND_FILL - text_column.add_theme_constant_override("separation", 5) - text_column.tooltip_text = tooltip - row.add_child(text_column) + var caption_panel := PanelContainer.new() + caption_panel.name = "TitleStoryFeatureCaption" + caption_panel.custom_minimum_size = Vector2(630, 40) + caption_panel.tooltip_text = tooltip + _apply_panel_style(caption_panel, "command_seal") + var caption_style := caption_panel.get_theme_stylebox("panel") + if caption_style != null: + caption_style.content_margin_left = 8 + caption_style.content_margin_right = 8 + caption_style.content_margin_top = 3 + caption_style.content_margin_bottom = 3 + column.add_child(caption_panel) var title_row := HBoxContainer.new() - title_row.custom_minimum_size = Vector2(164, 30) - title_row.add_theme_constant_override("separation", 6) + title_row.custom_minimum_size = Vector2(612, 34) + title_row.add_theme_constant_override("separation", 8) title_row.tooltip_text = tooltip - text_column.add_child(title_row) + caption_panel.add_child(title_row) title_row.add_child(_make_seal_tile("1", 28)) var title_label := Label.new() title_label.name = "TitleStoryFeatureTitle" title_label.text = title - title_label.custom_minimum_size = Vector2(130, 30) + title_label.custom_minimum_size = Vector2(124, 32) title_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER title_label.tooltip_text = tooltip - _apply_label_style(title_label, UI_PARCHMENT_TEXT, 18) + _apply_label_style(title_label, UI_PARCHMENT_TEXT, 17) title_row.add_child(title_label) var body_label := Label.new() body_label.name = "TitleStoryFeatureBody" body_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART - body_label.custom_minimum_size = Vector2(164, 122) + body_label.custom_minimum_size = Vector2(452, 32) + body_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER body_label.tooltip_text = tooltip - _apply_label_style(body_label, UI_AGED_INK, 12) + _apply_label_style(body_label, UI_PARCHMENT_TEXT, 12) _set_fitted_label_text(body_label, body, 12, 10, body_label.custom_minimum_size) - text_column.add_child(body_label) + title_row.add_child(body_label) _set_control_tree_tooltip(panel, tooltip) return panel @@ -2470,15 +2483,15 @@ func _make_title_story_preview_card(title: String, image_path: String, index: in func _make_opening_story_beat_strip() -> PanelContainer: var panel := PanelContainer.new() panel.name = "OpeningStoryBeatStrip" - panel.position = Vector2(650, 24) - panel.size = Vector2(560, 82) - panel.custom_minimum_size = Vector2(560, 82) + panel.position = Vector2(632, 24) + panel.size = Vector2(592, 88) + panel.custom_minimum_size = Vector2(592, 88) panel.modulate = Color(1.0, 1.0, 1.0, 0.90) _apply_panel_style(panel, "transparent_overlay") opening_prologue_story_strip = HBoxContainer.new() opening_prologue_story_strip.name = "OpeningStoryBeatRow" - opening_prologue_story_strip.custom_minimum_size = Vector2(536, 68) + opening_prologue_story_strip.custom_minimum_size = Vector2(568, 74) opening_prologue_story_strip.add_theme_constant_override("separation", 8) panel.add_child(opening_prologue_story_strip) return panel @@ -2514,13 +2527,13 @@ func _make_opening_story_beat_card(page: Dictionary, index: int, is_current: boo card.modulate = Color(1.0, 1.0, 1.0, 1.0) if is_current else Color(0.56, 0.55, 0.50, 0.88) var column := VBoxContainer.new() - column.custom_minimum_size = Vector2(118, 60) + column.custom_minimum_size = Vector2(126, 66) column.add_theme_constant_override("separation", 3) column.tooltip_text = tooltip card.add_child(column) var title_row := HBoxContainer.new() - title_row.custom_minimum_size = Vector2(118, 18) + title_row.custom_minimum_size = Vector2(126, 18) title_row.add_theme_constant_override("separation", 4) title_row.tooltip_text = tooltip column.add_child(title_row) @@ -4334,14 +4347,14 @@ func _create_hud() -> void: title_column.add_child(_make_title_story_preview_strip()) var title_body_panel := PanelContainer.new() - title_body_panel.custom_minimum_size = Vector2(646, 246) + title_body_panel.custom_minimum_size = Vector2(646, 232) _apply_panel_style(title_body_panel, "command_seal") title_column.add_child(title_body_panel) var title_body_row := HBoxContainer.new() title_body_row.add_theme_constant_override("separation", 10) title_body_panel.add_child(title_body_row) - title_body_row.add_child(_make_edict_marker_stack(["", "", ""], 222)) + title_body_row.add_child(_make_edict_marker_stack(["", "", ""], 208)) var title_menu_column := VBoxContainer.new() title_menu_column.add_theme_constant_override("separation", 10) diff --git a/tools/smoke_title_menu.gd b/tools/smoke_title_menu.gd index 5f79999..d4ba899 100644 --- a/tools/smoke_title_menu.gd +++ b/tools/smoke_title_menu.gd @@ -92,12 +92,15 @@ func _check_title_menu_start_load_and_settings(failures: Array[String]) -> void: 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 < 430.0 or feature_image.custom_minimum_size.y < 160.0: - failures.append("title story feature should lead with a larger generated artwork frame: %s" % str(feature_image.custom_minimum_size)) + 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("황건의 난"):