Add ancient seal ribbons to battle UI
This commit is contained in:
@@ -1810,6 +1810,10 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
|
||||
_check_panel_style_fill(failures, scene.dialogue_portrait_panel, "dialogue portrait panel", Color(0.055, 0.025, 0.016, 1.0))
|
||||
_check_panel_style_fill(failures, scene.dialogue_speaker_panel, "dialogue speaker seal panel", Color(0.36, 0.030, 0.018, 1.0))
|
||||
_check_panel_style_fill(failures, scene.dialogue_text_panel, "dialogue text scroll panel", Color(0.69, 0.55, 0.32, 0.995))
|
||||
_check_seal_ribbon(failures, scene.briefing_seal_ribbon, "briefing seal ribbon")
|
||||
_check_seal_ribbon(failures, scene.dialogue_seal_ribbon, "dialogue seal ribbon")
|
||||
_check_seal_ribbon(failures, scene.result_seal_ribbon, "result seal ribbon")
|
||||
_check_dialogue_column_budget(failures, scene)
|
||||
if scene.dialogue_continue_button == null or scene.dialogue_continue_button.text != "Next Slip":
|
||||
failures.append("dialogue continue button should use ancient slip text")
|
||||
if scene.dialogue_previous_button == null or scene.dialogue_previous_button.text != "Earlier Slip":
|
||||
@@ -1858,9 +1862,42 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
|
||||
if scroll_rod.get_child_count() != 5:
|
||||
failures.append("scroll rod ornament should use five visual strips")
|
||||
scroll_rod.free()
|
||||
var seal_ribbon := scene._make_seal_ribbon(120, 18)
|
||||
_check_seal_ribbon(failures, seal_ribbon, "generated seal ribbon")
|
||||
seal_ribbon.free()
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_seal_ribbon(failures: Array[String], ribbon: HBoxContainer, label: String) -> void:
|
||||
if ribbon == null:
|
||||
failures.append("%s missing" % label)
|
||||
return
|
||||
if ribbon.get_child_count() != 5:
|
||||
failures.append("%s should use five clasp/ribbon/cluster segments" % label)
|
||||
return
|
||||
var cluster := ribbon.get_child(2) as HBoxContainer
|
||||
if cluster == null or cluster.get_child_count() != 3:
|
||||
failures.append("%s should include a three-seal center cluster" % label)
|
||||
|
||||
|
||||
func _check_dialogue_column_budget(failures: Array[String], scene) -> void:
|
||||
if scene.dialogue_column == null:
|
||||
failures.append("dialogue column missing")
|
||||
return
|
||||
var total_height := 0.0
|
||||
var visible_children := 0
|
||||
for child in scene.dialogue_column.get_children():
|
||||
var control := child as Control
|
||||
if control == null or not control.visible:
|
||||
continue
|
||||
visible_children += 1
|
||||
total_height += control.custom_minimum_size.y
|
||||
if visible_children > 1:
|
||||
total_height += float(visible_children - 1) * float(scene.dialogue_column.get_theme_constant("separation"))
|
||||
if total_height > scene.DIALOGUE_COLUMN_SIZE.y:
|
||||
failures.append("dialogue column decorations exceed fixed height: %.1f > %.1f" % [total_height, scene.DIALOGUE_COLUMN_SIZE.y])
|
||||
|
||||
|
||||
func _check_panel_style_fill(failures: Array[String], panel: PanelContainer, label: String, expected: Color) -> void:
|
||||
if panel == null:
|
||||
failures.append("%s missing" % label)
|
||||
|
||||
Reference in New Issue
Block a user