Replace the page-local flat navy rails, translucent slabs and pill buttons with the shared asset material, re-add the rail title, ground the party on one baseline with a contact shadow and ink name plates, and move value/warning text to a high-contrast ink-on-parchment pair. View contract node names and z-order are unchanged; M37 readiness view contract passes.
28 lines
1.1 KiB
GDScript
28 lines
1.1 KiB
GDScript
class_name ABGM55ReadinessHeader
|
|
extends Control
|
|
|
|
const UIFactory = preload("res://ui/shared/ui_factory.gd")
|
|
const Tokens = preload("res://foundation/ui_tokens.gd")
|
|
var values: Array = []
|
|
|
|
func configure(next_values: Array) -> ABGM55ReadinessHeader:
|
|
values = next_values
|
|
return self
|
|
|
|
func _ready() -> void:
|
|
clip_contents = true
|
|
for index in range(values.size()):
|
|
var item: Dictionary = Dictionary(values[index])
|
|
var label := UIFactory.label(String(item.get("text", "")), "label", 1.0, Color("#2f2417"))
|
|
label.name = String(item.get("name", "ReadinessHeaderValue%d" % index))
|
|
var slot := Rect2(item.get("slot", Rect2(float(item.get("left", 0.0)), 0.0, float(item.get("right", 0.2)) - float(item.get("left", 0.0)), 1.0)))
|
|
label.anchor_left = slot.position.x
|
|
label.anchor_top = slot.position.y
|
|
label.anchor_right = slot.end.x
|
|
label.anchor_bottom = slot.end.y
|
|
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
|
label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
|
label.clip_text = true
|
|
label.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
|
add_child(label)
|