fix(readiness): give summary a finished hierarchy
This commit is contained in:
@@ -12,22 +12,44 @@ func configure(next_facts: String, next_metrics: Array) -> ABGM55ReadinessFormat
|
||||
|
||||
func _ready() -> void:
|
||||
clip_contents = true
|
||||
var matte := ColorRect.new()
|
||||
var matte := Panel.new()
|
||||
matte.name = "ReadinessSummaryBand"
|
||||
## The static master contains two unused transition placeholders beneath
|
||||
## this region. The readiness summary is the sole owner of this surface, so
|
||||
## keep the parchment opaque and prevent those empty frames from leaking
|
||||
## through as if they were interactive content.
|
||||
matte.color = Color("#f2e4c5", 1.0)
|
||||
var parchment := StyleBoxFlat.new()
|
||||
parchment.bg_color = Color("#ead7ae", 0.98)
|
||||
parchment.border_color = Color("#8b6d3e", 0.92)
|
||||
parchment.set_border_width_all(2)
|
||||
parchment.set_corner_radius_all(8)
|
||||
parchment.shadow_color = Color("#101820", 0.20)
|
||||
parchment.shadow_size = 4
|
||||
parchment.content_margin_left = 12.0
|
||||
parchment.content_margin_right = 12.0
|
||||
parchment.content_margin_top = 8.0
|
||||
parchment.content_margin_bottom = 8.0
|
||||
matte.add_theme_stylebox_override("panel", parchment)
|
||||
matte.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
||||
matte.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
add_child(matte)
|
||||
move_child(matte, 0)
|
||||
var divider := ColorRect.new()
|
||||
divider.name = "ReadinessSummaryDivider"
|
||||
divider.anchor_left = 0.04
|
||||
divider.anchor_right = 0.96
|
||||
divider.anchor_top = 0.39
|
||||
divider.anchor_bottom = 0.40
|
||||
divider.color = Color("#9f8252", 0.48)
|
||||
divider.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
add_child(divider)
|
||||
var facts_label := UIFactory.label(facts, "body", 1.0, Color("#2b241b"))
|
||||
facts_label.name = "ReadinessFrozenFacts"
|
||||
facts_label.anchor_left = 0.03
|
||||
facts_label.anchor_right = 0.97
|
||||
facts_label.anchor_bottom = 0.38
|
||||
facts_label.add_theme_font_size_override("font_size", 18)
|
||||
facts_label.anchor_left = 0.04
|
||||
facts_label.anchor_right = 0.96
|
||||
facts_label.anchor_top = 0.03
|
||||
facts_label.anchor_bottom = 0.36
|
||||
facts_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
facts_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||
facts_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
@@ -35,7 +57,7 @@ func _ready() -> void:
|
||||
add_child(facts_label)
|
||||
for index in range(metrics.size()):
|
||||
var item: Dictionary = Dictionary(metrics[index])
|
||||
var label := UIFactory.label(String(item.get("text", "")), "micro", 1.0, Color("#2b241b"))
|
||||
var label := UIFactory.label(String(item.get("text", "")), "label", 1.0, Color("#493a29"))
|
||||
label.name = String(item.get("name", "ReadinessMetric%d" % index))
|
||||
label.anchor_left = float(item.get("left", 0.0))
|
||||
label.anchor_top = 0.42
|
||||
|
||||
Reference in New Issue
Block a user