Frame opening story beat artwork

This commit is contained in:
2026-06-20 06:39:27 +09:00
parent 1fe0554b1f
commit f7c7b9b9e3
3 changed files with 83 additions and 27 deletions

View File

@@ -146,12 +146,15 @@ const BRIEFING_FORCE_PREVIEW_MAX_ALLIES := 2
const BRIEFING_FORCE_PREVIEW_MAX_ENEMY_TYPES := 4
const TITLE_STORY_FEATURE_SIZE := Vector2(616, 122)
const TITLE_STORY_FEATURE_IMAGE_SIZE := Vector2(314, 96)
const TITLE_STORY_PREVIEW_STRIP_SIZE := Vector2(616, 86)
const TITLE_STORY_PREVIEW_CARD_SIZE := Vector2(140, 66)
const TITLE_STORY_PREVIEW_IMAGE_SIZE := Vector2(132, 44)
const TITLE_STORY_PREVIEW_STRIP_SIZE := Vector2(616, 92)
const TITLE_STORY_PREVIEW_CARD_SIZE := Vector2(140, 72)
const TITLE_STORY_PREVIEW_IMAGE_FRAME_SIZE := Vector2(132, 50)
const TITLE_STORY_PREVIEW_IMAGE_SIZE := Vector2(124, 42)
const TITLE_STORY_PREVIEW_LABEL_SIZE := Vector2(132, 15)
const OPENING_STORY_BEAT_CARD_SIZE := Vector2(122, 66)
const OPENING_STORY_BEAT_IMAGE_SIZE := Vector2(112, 42)
const OPENING_STORY_BEAT_CARD_SIZE := Vector2(136, 78)
const OPENING_STORY_BEAT_IMAGE_FRAME_SIZE := Vector2(126, 48)
const OPENING_STORY_BEAT_IMAGE_SIZE := Vector2(118, 40)
const OPENING_STORY_BEAT_LABEL_SIZE := Vector2(104, 18)
const COMMAND_NOTICE_ICON_SIZE := Vector2(32, 32)
const COMMAND_NOTICE_MAX_ICONS := 4
const CHAPTER_SEAL_BADGE_SIZE := Vector2(54, 54)
@@ -2082,7 +2085,7 @@ func _make_title_story_preview_strip() -> PanelContainer:
_apply_panel_style(panel, "hud_info")
var row := HBoxContainer.new()
row.custom_minimum_size = Vector2(584, 66)
row.custom_minimum_size = Vector2(584, 72)
row.add_theme_constant_override("separation", 8)
panel.add_child(row)
@@ -2106,11 +2109,24 @@ func _make_title_story_preview_card(title: String, image_path: String, index: in
card_style.content_margin_bottom = 3
var column := VBoxContainer.new()
column.custom_minimum_size = Vector2(132, 59)
column.custom_minimum_size = Vector2(132, 65)
column.add_theme_constant_override("separation", 2)
column.tooltip_text = card.tooltip_text
card.add_child(column)
var image_frame := PanelContainer.new()
image_frame.name = "TitleStoryPreviewImageFrame"
image_frame.custom_minimum_size = TITLE_STORY_PREVIEW_IMAGE_FRAME_SIZE
image_frame.tooltip_text = card.tooltip_text
_apply_panel_style(image_frame, "caption")
var frame_style := image_frame.get_theme_stylebox("panel")
if frame_style != null:
frame_style.content_margin_left = 3
frame_style.content_margin_right = 3
frame_style.content_margin_top = 3
frame_style.content_margin_bottom = 3
column.add_child(image_frame)
var texture_rect := TextureRect.new()
texture_rect.name = "TitleStoryPreviewImage"
texture_rect.custom_minimum_size = TITLE_STORY_PREVIEW_IMAGE_SIZE
@@ -2119,7 +2135,7 @@ func _make_title_story_preview_card(title: String, image_path: String, index: in
texture_rect.texture = _load_art_texture(image_path)
texture_rect.modulate = Color(0.96, 0.94, 0.88, 0.94)
texture_rect.tooltip_text = card.tooltip_text
column.add_child(texture_rect)
image_frame.add_child(texture_rect)
var label := Label.new()
label.name = "TitleStoryPreviewLabel"
@@ -2136,14 +2152,14 @@ 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(630, 32)
panel.size = Vector2(594, 86)
panel.custom_minimum_size = Vector2(594, 86)
panel.position = Vector2(604, 28)
panel.size = Vector2(620, 98)
panel.custom_minimum_size = Vector2(620, 98)
_apply_panel_style(panel, "hud_info")
opening_prologue_story_strip = HBoxContainer.new()
opening_prologue_story_strip.name = "OpeningStoryBeatRow"
opening_prologue_story_strip.custom_minimum_size = Vector2(562, 66)
opening_prologue_story_strip.custom_minimum_size = Vector2(588, 78)
opening_prologue_story_strip.add_theme_constant_override("separation", 8)
panel.add_child(opening_prologue_story_strip)
return panel
@@ -2179,11 +2195,46 @@ 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(112, 59)
column.add_theme_constant_override("separation", 2)
column.custom_minimum_size = Vector2(126, 69)
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(126, 18)
title_row.add_theme_constant_override("separation", 4)
title_row.tooltip_text = tooltip
column.add_child(title_row)
var seal := _make_seal_tile("%d" % (index + 1), 18)
seal.name = "OpeningStoryBeatSeal"
seal.modulate = Color(1.0, 1.0, 1.0, 1.0) if is_current else Color(0.70, 0.68, 0.62, 0.90)
title_row.add_child(seal)
var label := Label.new()
label.name = "OpeningStoryBeatLabel"
label.text = title
label.custom_minimum_size = OPENING_STORY_BEAT_LABEL_SIZE
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
label.clip_text = true
label.tooltip_text = tooltip
_apply_label_style(label, UI_PARCHMENT_TEXT if is_current else UI_OLD_BRONZE, 9)
title_row.add_child(label)
var image_frame := PanelContainer.new()
image_frame.name = "OpeningStoryBeatImageFrame"
image_frame.custom_minimum_size = OPENING_STORY_BEAT_IMAGE_FRAME_SIZE
image_frame.tooltip_text = tooltip
_apply_panel_style(image_frame, "caption")
var image_frame_style := image_frame.get_theme_stylebox("panel")
if image_frame_style != null:
image_frame_style.content_margin_left = 3
image_frame_style.content_margin_right = 3
image_frame_style.content_margin_top = 3
image_frame_style.content_margin_bottom = 3
column.add_child(image_frame)
var image := TextureRect.new()
image.name = "OpeningStoryBeatImage"
image.custom_minimum_size = OPENING_STORY_BEAT_IMAGE_SIZE
@@ -2192,18 +2243,7 @@ func _make_opening_story_beat_card(page: Dictionary, index: int, is_current: boo
image.texture = _load_art_texture(image_path)
image.modulate = Color(1.0, 0.96, 0.88, 0.98) if is_current else Color(0.82, 0.80, 0.74, 0.72)
image.tooltip_text = tooltip
column.add_child(image)
var label := Label.new()
label.name = "OpeningStoryBeatLabel"
label.text = "%d %s" % [index + 1, title]
label.custom_minimum_size = Vector2(112, 15)
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
label.clip_text = true
label.tooltip_text = tooltip
_apply_label_style(label, UI_PARCHMENT_TEXT if is_current else UI_OLD_BRONZE, 9)
column.add_child(label)
image_frame.add_child(image)
_set_control_tree_tooltip(card, tooltip)
return card