fix: keep character and journal headings visible

This commit is contained in:
goose
2026-10-09 15:57:58 -04:00
parent bbf89a9f36
commit f9ef3d72aa
2 changed files with 24 additions and 4 deletions
+15 -1
View File
@@ -81,6 +81,8 @@ func test_hud_preserves_legacy_responsive_panel_paths() -> void:
return
assert_true(stats_panel.get_global_rect().encloses(player_health.get_global_rect()))
assert_true(log_panel.get_global_rect().encloses(event_log.get_global_rect()))
_assert_legacy_panel_is_transparent_and_behind(stats_panel)
_assert_legacy_panel_is_transparent_and_behind(log_panel)
assert_true(prompt_panel.get_global_rect().encloses(prompt.get_global_rect()))
assert_true(help_panel.get_global_rect().encloses(help.get_global_rect()))
@@ -465,6 +467,13 @@ func test_named_left_and_right_rail_sections_are_visible_enclosed_and_non_overla
_assert_named_non_overlapping_sections(layout, "LeftRail", ["CharacterSection", "ObjectivesSection", "StatusSection"])
_assert_named_non_overlapping_sections(layout, "RightRail", ["JournalSection", "MapSection"])
func _assert_legacy_panel_is_transparent_and_behind(panel: PanelContainer) -> void:
assert_true(panel.has_theme_stylebox_override(&"panel"), "%s requires an explicit local panel style rather than an inherited theme style" % panel.name)
var style := panel.get_theme_stylebox(&"panel")
assert_not_null(style, "%s requires an explicit local transparent panel style" % panel.name)
assert_true(style is StyleBoxEmpty or (style is StyleBoxFlat and (style as StyleBoxFlat).bg_color.a == 0.0), "%s must not repaint over section headings" % panel.name)
assert_true(panel.show_behind_parent, "%s must draw behind its parent and section titles" % panel.name)
func _assert_named_non_overlapping_sections(layout: Control, rail_name: String, section_names: Array[String]) -> void:
var rail := layout.get_node_or_null(rail_name) as Control
assert_not_null(rail, "ResponsiveLayout requires %s" % rail_name)
@@ -822,7 +831,12 @@ func test_character_and_journal_titles_use_the_final_large_outlined_light_style(
continue
assert_gte(title.get_theme_font_size(&"font_size"), 20, "%s needs a >=20px font at 1920x1080" % title.name)
assert_gte(title.get_theme_constant(&"outline_size"), 3, "%s needs a >=3px contour" % title.name)
assert_gte(title.get_theme_color(&"font_color").get_luminance(), 0.75, "%s needs a >=0.75 luminance" % title.name)
var font_color := title.get_theme_color(&"font_color")
assert_gte(font_color.r, 0.95, "%s must use an explicit gold/yellow red channel" % title.name)
assert_gte(font_color.g, 0.70, "%s must use an explicit gold/yellow green channel" % title.name)
assert_lte(font_color.g, 0.90, "%s must use an explicit gold/yellow green channel" % title.name)
assert_lte(font_color.b, 0.55, "%s must use an explicit gold/yellow blue channel" % title.name)
assert_eq(font_color.a, 1.0, "%s must be fully opaque" % title.name)
assert_gte(title.get_global_rect().position.y - section.get_global_rect().position.y, 16.0, "%s needs a >=16px vertical inset" % title.name)
func test_command_bar_keeps_all_three_zones_readable_at_reference_and_compact_sizes() -> void: