Add Weishui bridge and antique battle UI

This commit is contained in:
2026-06-19 05:18:54 +09:00
parent b08370cf45
commit dc3dc06eb0
5 changed files with 717 additions and 76 deletions

View File

@@ -71,12 +71,12 @@ const POST_MOVE_PICKER_PANEL_SIZE := Vector2(320, 210)
const TARGETING_HINT_PANEL_SIZE := Vector2(240, 94)
const LOCAL_COMMAND_PANEL_GAP := 8.0
const LOCAL_COMMAND_PANEL_BOARD_PADDING := 4.0
const UI_RICE_PAPER := Color(0.61, 0.49, 0.30, 0.98)
const UI_RICE_PAPER_LIGHT := Color(0.74, 0.60, 0.36, 0.99)
const UI_RICE_PAPER_DARK := Color(0.34, 0.22, 0.11, 0.98)
const UI_RICE_PAPER := Color(0.58, 0.45, 0.25, 0.98)
const UI_RICE_PAPER_LIGHT := Color(0.71, 0.56, 0.31, 0.99)
const UI_RICE_PAPER_DARK := Color(0.29, 0.17, 0.075, 0.98)
const UI_AGED_INK := Color(0.09, 0.055, 0.032, 1.0)
const UI_DARK_LACQUER := Color(0.12, 0.045, 0.025, 0.98)
const UI_LACQUER_EDGE := Color(0.055, 0.025, 0.016, 1.0)
const UI_DARK_LACQUER := Color(0.085, 0.025, 0.012, 0.988)
const UI_LACQUER_EDGE := Color(0.035, 0.014, 0.008, 1.0)
const UI_CINNABAR := Color(0.52, 0.045, 0.025, 1.0)
const UI_CINNABAR_DARK := Color(0.32, 0.025, 0.016, 1.0)
const UI_OLD_BRONZE := Color(0.78, 0.58, 0.27, 1.0)
@@ -89,12 +89,15 @@ const UI_DISABLED_TEXT := Color(0.48, 0.40, 0.29, 1.0)
const UI_SILK_WASH := Color(0.80, 0.64, 0.37, 1.0)
const UI_SILK_FIBER := Color(0.18, 0.10, 0.045, 1.0)
const UI_SOOT_EDGE := Color(0.035, 0.018, 0.012, 1.0)
const UI_BONE_PAPER := Color(0.72, 0.60, 0.39, 0.995)
const UI_BONE_PAPER := Color(0.66, 0.52, 0.31, 0.995)
const UI_INK_WASH := Color(0.10, 0.065, 0.040, 1.0)
const UI_DARK_JADE := Color(0.055, 0.18, 0.13, 1.0)
const UI_JADE_EDGE := Color(0.12, 0.36, 0.25, 1.0)
const UI_SEAL_RED := Color(0.64, 0.055, 0.032, 1.0)
const UI_SEAL_RED_DARK := Color(0.28, 0.020, 0.014, 1.0)
const UI_CHARCOAL_WASH := Color(0.045, 0.026, 0.016, 1.0)
const UI_SCROLL_CENTER := Color(0.74, 0.58, 0.32, 0.996)
const UI_SCROLL_EDGE := Color(0.43, 0.25, 0.095, 0.996)
const MAP_SCROLL_FRAME_PADDING := 12.0
var state: BattleState = BattleStateScript.new()
@@ -359,54 +362,54 @@ func _apply_panel_style(panel: PanelContainer, variant: String) -> void:
var shadow_size := 6
match variant:
"paper":
fill = UI_BONE_PAPER
border = UI_SOOT_EDGE
border_width = 5
margin = 18
shadow_size = 12
fill = UI_SCROLL_CENTER
border = UI_CHARCOAL_WASH
border_width = 7
margin = 20
shadow_size = 16
"edict":
fill = Color(0.76, 0.63, 0.40, 0.995)
border = UI_SEAL_RED_DARK
border_width = 4
margin = 14
shadow_size = 6
fill = Color(0.55, 0.36, 0.15, 0.995)
border = UI_INK_WASH
border_width = 5
margin = 15
shadow_size = 8
"seal":
fill = Color(0.34, 0.026, 0.016, 1.0)
fill = Color(0.23, 0.018, 0.010, 1.0)
border = UI_OLD_BRONZE
border_width = 3
margin = 9
border_width = 4
margin = 10
"speaker_seal":
fill = UI_SEAL_RED_DARK
border = UI_TARNISHED_BRONZE
border_width = 3
border_width = 4
margin = 9
"portrait":
fill = UI_LACQUER_EDGE
border = UI_JADE_EDGE
border_width = 4
border = UI_OLD_BRONZE
border_width = 5
margin = 3
"dialogue":
fill = Color(0.052, 0.022, 0.014, 0.995)
border = UI_JADE_EDGE
border_width = 5
margin = 16
shadow_size = 14
fill = Color(0.036, 0.012, 0.006, 0.996)
border = UI_SEAL_RED_DARK
border_width = 7
margin = 18
shadow_size = 18
"speech_scroll":
fill = Color(0.75, 0.62, 0.39, 0.995)
fill = Color(0.67, 0.50, 0.27, 0.996)
border = UI_INK_WASH
border_width = 4
border_width = 5
margin = 14
shadow_size = 3
shadow_size = 4
"notice":
fill = Color(0.070, 0.020, 0.014, 0.982)
border = UI_SEAL_RED
border_width = 3
margin = 9
"map":
fill = Color(0.062, 0.13, 0.095, 1.0)
border = UI_DARK_JADE
border_width = 4
margin = 3
fill = Color(0.20, 0.12, 0.050, 1.0)
border = UI_INK_WASH
border_width = 5
margin = 4
"compact":
fill = Color(0.052, 0.078, 0.052, 0.982)
border = UI_JADE_EDGE
@@ -420,15 +423,15 @@ func _apply_panel_style(panel: PanelContainer, variant: String) -> void:
margin = 10
shadow_size = 3
"caption":
fill = Color(0.055, 0.16, 0.11, 0.98)
border = UI_TARNISHED_BRONZE
border_width = 2
fill = Color(0.17, 0.030, 0.017, 0.988)
border = UI_OLD_BRONZE
border_width = 3
margin = 5
shadow_size = 2
"result_tablet":
fill = Color(0.54, 0.43, 0.27, 0.992)
fill = Color(0.48, 0.34, 0.17, 0.994)
border = UI_SOOT_EDGE
border_width = 5
border_width = 7
margin = 18
shadow_size = 12
_:
@@ -439,9 +442,11 @@ func _apply_panel_style(panel: PanelContainer, variant: String) -> void:
func _make_button_style(fill: Color, border: Color, border_width: int) -> StyleBoxFlat:
var style := _make_panel_style(fill, border, border_width, 0, 8, 0)
style.set_border_width(SIDE_TOP, border_width + 1)
style.set_border_width(SIDE_BOTTOM, border_width + 1)
var style := _make_panel_style(fill, border, border_width, 0, 10, 0)
style.set_border_width(SIDE_TOP, border_width + 2)
style.set_border_width(SIDE_BOTTOM, border_width + 2)
style.set_border_width(SIDE_LEFT, border_width + 1)
style.set_border_width(SIDE_RIGHT, border_width + 1)
return style
@@ -502,14 +507,14 @@ func _apply_control_font(control: Control, bold: bool = false) -> void:
func _apply_button_style(button: Button, important: bool = false) -> void:
if button == null:
return
var normal_fill := UI_SEAL_RED_DARK if important else Color(0.045, 0.13, 0.090, 0.985)
var hover_fill := UI_SEAL_RED if important else Color(0.10, 0.24, 0.16, 1.0)
var pressed_fill := Color(0.20, 0.026, 0.018, 1.0)
button.add_theme_stylebox_override("normal", _make_button_style(normal_fill, UI_TARNISHED_BRONZE, 2))
var normal_fill := UI_SEAL_RED_DARK if important else Color(0.27, 0.15, 0.055, 0.985)
var hover_fill := UI_SEAL_RED if important else Color(0.37, 0.22, 0.085, 1.0)
var pressed_fill := Color(0.17, 0.030, 0.018, 1.0)
button.add_theme_stylebox_override("normal", _make_button_style(normal_fill, UI_INK_WASH, 2))
button.add_theme_stylebox_override("hover", _make_button_style(hover_fill, UI_OLD_BRONZE, 2))
button.add_theme_stylebox_override("pressed", _make_button_style(pressed_fill, UI_OLD_BRONZE, 2))
button.add_theme_stylebox_override("focus", _make_button_style(Color(0.075, 0.23, 0.16, 0.96), UI_OLD_BRONZE, 2))
button.add_theme_stylebox_override("disabled", _make_button_style(Color(0.13, 0.09, 0.065, 0.88), UI_RICE_PAPER_DARK, 1))
button.add_theme_stylebox_override("focus", _make_button_style(Color(0.34, 0.20, 0.080, 0.96), UI_OLD_BRONZE, 2))
button.add_theme_stylebox_override("disabled", _make_button_style(Color(0.13, 0.080, 0.046, 0.88), UI_RICE_PAPER_DARK, 1))
button.add_theme_color_override("font_color", UI_PARCHMENT_TEXT)
button.add_theme_color_override("font_hover_color", UI_PARCHMENT_TEXT)
button.add_theme_color_override("font_pressed_color", UI_PARCHMENT_TEXT)
@@ -644,6 +649,23 @@ func _make_seal_tick() -> ColorRect:
return tick
func _make_bamboo_gutter(width: float = 18.0, height: float = 0.0) -> HBoxContainer:
var row := HBoxContainer.new()
row.custom_minimum_size = Vector2(width, height)
row.size_flags_vertical = Control.SIZE_EXPAND_FILL
row.mouse_filter = Control.MOUSE_FILTER_IGNORE
row.add_theme_constant_override("separation", 2)
var strip_width := maxf(3.0, floorf((width - 4.0) / 3.0))
for index in range(3):
var strip := ColorRect.new()
strip.color = UI_BAMBOO if index == 1 else UI_BAMBOO_DARK
strip.custom_minimum_size = Vector2(strip_width, height)
strip.size_flags_vertical = Control.SIZE_EXPAND_FILL
strip.mouse_filter = Control.MOUSE_FILTER_IGNORE
row.add_child(strip)
return row
func _make_ornament_bar(width: float = 4.0, height: float = 0.0) -> ColorRect:
var bar := ColorRect.new()
bar.color = UI_CINNABAR
@@ -1041,20 +1063,20 @@ func _create_hud() -> void:
root.add_child(briefing_panel)
var briefing_column := VBoxContainer.new()
briefing_column.add_theme_constant_override("separation", 7)
briefing_column.add_theme_constant_override("separation", 8)
briefing_panel.add_child(briefing_column)
var briefing_title_panel := PanelContainer.new()
briefing_title_panel.custom_minimum_size = Vector2(680, 40)
briefing_title_panel.custom_minimum_size = Vector2(680, 46)
_apply_panel_style(briefing_title_panel, "seal")
briefing_column.add_child(briefing_title_panel)
briefing_title_label = Label.new()
briefing_title_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
briefing_title_label.custom_minimum_size = Vector2(656, 28)
briefing_title_label.custom_minimum_size = Vector2(656, 34)
briefing_title_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
briefing_title_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
_apply_label_style(briefing_title_label, UI_PARCHMENT_TEXT, 20)
_apply_label_style(briefing_title_label, UI_PARCHMENT_TEXT, 22)
briefing_title_panel.add_child(briefing_title_label)
briefing_seal_ribbon = _make_seal_ribbon(680, 18)
@@ -1064,14 +1086,14 @@ func _create_hud() -> void:
briefing_location_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
briefing_location_label.custom_minimum_size = Vector2(680, 22)
briefing_location_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
_apply_label_style(briefing_location_label, UI_MUTED_JADE, 14)
_apply_label_style(briefing_location_label, UI_INK_WASH, 14)
briefing_column.add_child(briefing_location_label)
briefing_column.add_child(_make_scroll_rod(680, 4))
briefing_column.add_child(_make_section_caption("승패 조서", 680))
briefing_column.add_child(_make_section_caption("軍令 승패 조서", 680))
briefing_objective_panel = PanelContainer.new()
briefing_objective_panel.custom_minimum_size = Vector2(680, 92)
briefing_objective_panel.custom_minimum_size = Vector2(680, 104)
_apply_panel_style(briefing_objective_panel, "edict")
briefing_column.add_child(briefing_objective_panel)
@@ -1079,16 +1101,17 @@ func _create_hud() -> void:
briefing_objective_row.add_theme_constant_override("separation", 8)
briefing_objective_panel.add_child(briefing_objective_row)
briefing_objective_row.add_child(_make_ornament_bar(5, 72))
briefing_objective_row.add_child(_make_bamboo_gutter(18, 84))
briefing_objective_label = Label.new()
briefing_objective_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
briefing_objective_label.custom_minimum_size = Vector2(632, 72)
briefing_objective_label.custom_minimum_size = Vector2(586, 84)
briefing_objective_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
_apply_label_style(briefing_objective_label, UI_AGED_INK, 15)
briefing_objective_row.add_child(briefing_objective_label)
briefing_objective_row.add_child(_make_bamboo_gutter(18, 84))
briefing_column.add_child(_make_section_caption("비단 전장도 군막 장부", 680))
briefing_column.add_child(_make_section_caption("비단 전장도 · 군막 장부", 680))
briefing_camp_overview_row = HBoxContainer.new()
briefing_camp_overview_row.custom_minimum_size = Vector2(680, 84)
@@ -1108,7 +1131,7 @@ func _create_hud() -> void:
briefing_camp_overview_texture.set_anchors_preset(Control.PRESET_FULL_RECT)
briefing_camp_overview_texture.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
briefing_camp_overview_texture.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
briefing_camp_overview_texture.modulate = Color(0.92, 0.78, 0.54, 0.94)
briefing_camp_overview_texture.modulate = Color(0.78, 0.60, 0.35, 0.92)
camp_thumbnail_stack.add_child(briefing_camp_overview_texture)
briefing_camp_overview_fallback_label = Label.new()
@@ -1386,12 +1409,12 @@ func _create_hud() -> void:
dialogue_column.add_child(dialogue_seal_ribbon)
dialogue_speaker_panel = PanelContainer.new()
dialogue_speaker_panel.custom_minimum_size = Vector2(DIALOGUE_TEXT_SIZE.x, 32)
dialogue_speaker_panel.custom_minimum_size = Vector2(DIALOGUE_TEXT_SIZE.x, 34)
_apply_panel_style(dialogue_speaker_panel, "speaker_seal")
dialogue_column.add_child(dialogue_speaker_panel)
dialogue_speaker_label = Label.new()
dialogue_speaker_label.custom_minimum_size = Vector2(DIALOGUE_TEXT_SIZE.x - 24, 22)
dialogue_speaker_label.custom_minimum_size = Vector2(DIALOGUE_TEXT_SIZE.x - 24, 24)
dialogue_speaker_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
_apply_label_style(dialogue_speaker_label, UI_PARCHMENT_TEXT, 18)
dialogue_speaker_panel.add_child(dialogue_speaker_label)
@@ -1405,15 +1428,16 @@ func _create_hud() -> void:
dialogue_text_row.add_theme_constant_override("separation", 8)
dialogue_text_panel.add_child(dialogue_text_row)
dialogue_text_row.add_child(_make_ornament_bar(4, DIALOGUE_TEXT_SIZE.y - 20))
dialogue_text_row.add_child(_make_bamboo_gutter(18, DIALOGUE_TEXT_SIZE.y - 20))
dialogue_text_label = Label.new()
dialogue_text_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
dialogue_text_label.custom_minimum_size = Vector2(DIALOGUE_TEXT_SIZE.x - 42, DIALOGUE_TEXT_SIZE.y - 20)
dialogue_text_label.custom_minimum_size = Vector2(DIALOGUE_TEXT_SIZE.x - 88, DIALOGUE_TEXT_SIZE.y - 20)
dialogue_text_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
dialogue_text_label.size_flags_vertical = Control.SIZE_EXPAND_FILL
_apply_label_style(dialogue_text_label, UI_AGED_INK, 17)
dialogue_text_row.add_child(dialogue_text_label)
dialogue_text_row.add_child(_make_bamboo_gutter(18, DIALOGUE_TEXT_SIZE.y - 20))
dialogue_column.add_child(_make_scroll_rod(DIALOGUE_TEXT_SIZE.x, 3))
@@ -4727,7 +4751,7 @@ func _format_briefing_camp_overview_text(briefing: Dictionary, prep_locked: bool
parts.append("병장고 비축")
if prep_locked:
parts.append("회상 두루마리 봉인")
return _join_strings(parts, " | ")
return _join_strings(parts, " · ")
func _format_briefing_talk_overview_text() -> String: