Add ancient seal ribbons to battle UI

This commit is contained in:
2026-06-19 03:36:40 +09:00
parent 27c9de787a
commit 0026d5b904
2 changed files with 91 additions and 1 deletions

View File

@@ -131,6 +131,7 @@ var inventory_label: Label
var briefing_panel: PanelContainer
var briefing_title_label: Label
var briefing_location_label: Label
var briefing_seal_ribbon: HBoxContainer
var briefing_objective_panel: PanelContainer
var briefing_objective_label: Label
var briefing_camp_overview_row: HBoxContainer
@@ -182,11 +183,13 @@ var dialogue_speaker_panel: PanelContainer
var dialogue_speaker_label: Label
var dialogue_text_panel: PanelContainer
var dialogue_text_label: Label
var dialogue_seal_ribbon: HBoxContainer
var dialogue_progress_label: Label
var dialogue_previous_button: Button
var dialogue_continue_button: Button
var result_panel: PanelContainer
var result_label: Label
var result_seal_ribbon: HBoxContainer
var result_choice_list: VBoxContainer
var result_restart_button: Button
var next_battle_button: Button
@@ -563,6 +566,49 @@ func _make_scroll_rod(width: float = 0.0, height: float = 4.0) -> HBoxContainer:
return row
func _make_seal_ribbon(width: float = 0.0, height: float = 18.0) -> HBoxContainer:
var row := HBoxContainer.new()
row.custom_minimum_size = Vector2(width, height)
row.size_flags_horizontal = Control.SIZE_EXPAND_FILL
row.add_theme_constant_override("separation", 4)
row.add_child(_make_lacquer_clasp(height))
row.add_child(_make_bronze_ribbon_strip(height))
row.add_child(_make_seal_cluster(height))
row.add_child(_make_bronze_ribbon_strip(height))
row.add_child(_make_lacquer_clasp(height))
return row
func _make_lacquer_clasp(size: float) -> ColorRect:
var clasp := ColorRect.new()
clasp.color = UI_CINNABAR_DARK
clasp.custom_minimum_size = Vector2(size, size)
clasp.mouse_filter = Control.MOUSE_FILTER_IGNORE
return clasp
func _make_bronze_ribbon_strip(height: float) -> ColorRect:
var strip := ColorRect.new()
strip.color = Color(UI_TARNISHED_BRONZE.r, UI_TARNISHED_BRONZE.g, UI_TARNISHED_BRONZE.b, 0.92)
strip.custom_minimum_size = Vector2(12, height)
strip.size_flags_horizontal = Control.SIZE_EXPAND_FILL
strip.mouse_filter = Control.MOUSE_FILTER_IGNORE
return strip
func _make_seal_cluster(height: float) -> HBoxContainer:
var cluster := HBoxContainer.new()
cluster.custom_minimum_size = Vector2(height * 3.0 + 4.0, height)
cluster.add_theme_constant_override("separation", 2)
for index in range(3):
var tile := ColorRect.new()
tile.color = UI_CINNABAR if index == 1 else UI_CINNABAR_DARK
tile.custom_minimum_size = Vector2(height, height)
tile.mouse_filter = Control.MOUSE_FILTER_IGNORE
cluster.add_child(tile)
return cluster
func _make_section_caption(text: String, width: float = 0.0) -> Control:
var panel := PanelContainer.new()
panel.custom_minimum_size = Vector2(width, 24)
@@ -1005,6 +1051,9 @@ func _create_hud() -> void:
_apply_label_style(briefing_title_label, UI_PARCHMENT_TEXT, 20)
briefing_title_panel.add_child(briefing_title_label)
briefing_seal_ribbon = _make_seal_ribbon(680, 18)
briefing_column.add_child(briefing_seal_ribbon)
briefing_location_label = Label.new()
briefing_location_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
briefing_location_label.custom_minimum_size = Vector2(680, 22)
@@ -1327,7 +1376,8 @@ func _create_hud() -> void:
dialogue_column.add_theme_constant_override("separation", 8)
dialogue_row.add_child(dialogue_column)
dialogue_column.add_child(_make_scroll_rod(DIALOGUE_TEXT_SIZE.x, 3))
dialogue_seal_ribbon = _make_seal_ribbon(DIALOGUE_TEXT_SIZE.x, 18)
dialogue_column.add_child(dialogue_seal_ribbon)
dialogue_speaker_panel = PanelContainer.new()
dialogue_speaker_panel.custom_minimum_size = Vector2(DIALOGUE_TEXT_SIZE.x, 32)
@@ -1398,6 +1448,9 @@ func _create_hud() -> void:
result_column.add_child(_make_scroll_rod(520, 4))
result_seal_ribbon = _make_seal_ribbon(520, 18)
result_column.add_child(result_seal_ribbon)
result_label = Label.new()
result_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
result_label.vertical_alignment = VERTICAL_ALIGNMENT_TOP