Make CCS vitals window draggable
This commit is contained in:
@@ -95,8 +95,14 @@ func _run() -> void:
|
||||
_assert(screen.active_scene.vitals_launcher.visible, "the computer desktop should expose a Vitals app")
|
||||
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(screen.active_scene.vitals_header.get_node("Title").text == "Vitals", "the vital window should use the concise Vitals heading")
|
||||
_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")
|
||||
screen.active_scene._set_vitals_window_position(Vector2(75.0, 55.0))
|
||||
_assert(screen.active_scene.vitals_window.position.is_equal_approx(Vector2(75.0, 55.0)), "the Vitals window should support repositioning by its header")
|
||||
screen.active_scene._set_vitals_window_position(Vector2(-500.0, 5000.0))
|
||||
var max_vitals_position: Vector2 = screen.active_scene.size - screen.active_scene.vitals_window.size
|
||||
_assert(screen.active_scene.vitals_window.position.is_equal_approx(Vector2(0.0, max_vitals_position.y)), "dragging should keep the Vitals window inside the computer viewport")
|
||||
_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")
|
||||
|
||||
Reference in New Issue
Block a user