Fix CCS vitals layout
This commit is contained in:
@@ -96,6 +96,7 @@ func _run() -> void:
|
||||
screen.active_scene.vitals_launcher.pressed.emit()
|
||||
_assert(screen.active_scene.is_vitals_open(), "the Vitals app should open a nurse vital-sign window")
|
||||
_assert(_vital_values(screen.active_scene) == ["36.8 C (98.2 F)", "76/min", "14/min", "122 mm Hg", "76 mm Hg", "99% on room air"], "the Vitals app should render the active attempt data in clinical order")
|
||||
_assert(_vital_values_fit(screen.active_scene), "vital values should retain a readable column without character-by-character wrapping")
|
||||
_assert(screen.close_transient_overlay(), "the first Escape should close the Vitals app")
|
||||
_assert(not screen.active_scene.is_vitals_open() and screen.active_scene.is_computer_open(), "closing Vitals should return to the computer desktop")
|
||||
_assert(screen.close_transient_overlay(), "the second Escape should close the computer")
|
||||
@@ -307,6 +308,14 @@ func _vital_values(scene: Control) -> Array:
|
||||
return values
|
||||
|
||||
|
||||
func _vital_values_fit(scene: Control) -> bool:
|
||||
for index in range(1, scene.vitals_rows.get_child_count(), 2):
|
||||
var label := scene.vitals_rows.get_child(index) as Label
|
||||
if label == null or label.size.x < 220.0 or label.get_line_count() != 1:
|
||||
return false
|
||||
return true
|
||||
|
||||
|
||||
func _choice_labels_fit(scene: Control) -> bool:
|
||||
for button in scene.choice_container.get_children():
|
||||
var label := button.get_child(0) as Label
|
||||
|
||||
Reference in New Issue
Block a user