Prioritize examination modal input
This commit is contained in:
@@ -286,7 +286,7 @@ func complete_response_transition() -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _input(event: InputEvent) -> void:
|
func _input(event: InputEvent) -> void:
|
||||||
if computer_overlay.visible:
|
if computer_overlay.visible or (physical_exam_panel != null and physical_exam_panel.visible):
|
||||||
return
|
return
|
||||||
if _event_targets_computer_launcher(event):
|
if _event_targets_computer_launcher(event):
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -238,6 +238,11 @@ func _run() -> void:
|
|||||||
_assert(screen.current_view == "doctor_office", "attempt refreshes should preserve the interview phase")
|
_assert(screen.current_view == "doctor_office", "attempt refreshes should preserve the interview phase")
|
||||||
_assert(screen.active_scene.physical_exam_finding_text.text == "Mild epigastric tenderness.", "the returned chart finding should be displayed")
|
_assert(screen.active_scene.physical_exam_finding_text.text == "Mild epigastric tenderness.", "the returned chart finding should be displayed")
|
||||||
_assert(screen.active_scene.physical_exam_result_button.visible, "a completed exam should present a focused result card")
|
_assert(screen.active_scene.physical_exam_result_button.visible, "a completed exam should present a focused result card")
|
||||||
|
var result_dialogue_page: int = screen.active_scene.dialogue_page_index
|
||||||
|
screen.active_scene._input(_left_click(screen.active_scene.physical_exam_result_button.get_global_rect().get_center()))
|
||||||
|
_assert(screen.active_scene.physical_exam_result_button.visible \
|
||||||
|
and screen.active_scene.dialogue_page_index == result_dialogue_page,
|
||||||
|
"scene-wide dialogue input should not consume clicks while an examination result is open")
|
||||||
screen.active_scene.physical_exam_result_button.pressed.emit()
|
screen.active_scene.physical_exam_result_button.pressed.emit()
|
||||||
_assert(screen.active_scene.is_physical_exam_visible(), "terminal exam results should return to the exam selector")
|
_assert(screen.active_scene.is_physical_exam_visible(), "terminal exam results should return to the exam selector")
|
||||||
screen.active_scene.open_computer()
|
screen.active_scene.open_computer()
|
||||||
|
|||||||
Reference in New Issue
Block a user