Fix CCS scene-wide dialogue clicks
This commit is contained in:
@@ -95,25 +95,25 @@ func _run() -> void:
|
||||
_assert(screen.active_scene.dialogue_continue_hint.visible, "the continuation prompt should remain visible while text is typing")
|
||||
_assert(screen.active_scene.dialogue_continue_hint.text == "Click to continue ▼", "every dialogue page should use consistent continuation wording")
|
||||
var outside_click := _left_click(screen.active_scene.get_global_rect().end + Vector2(50.0, 50.0))
|
||||
screen.active_scene._unhandled_input(outside_click)
|
||||
screen.active_scene._input(outside_click)
|
||||
_assert(not screen.active_scene.dialogue_reveal_complete, "clicks outside the doctor scene should not affect dialogue")
|
||||
var scene_click := _left_click(screen.active_scene.get_global_rect().get_center())
|
||||
screen.active_scene._unhandled_input(scene_click)
|
||||
screen.active_scene._input(scene_click)
|
||||
_assert(screen.active_scene.dialogue_page_index == 0, "clicking during typing should complete rather than skip the current page")
|
||||
_assert(screen.active_scene.dialogue_continue_hint.visible, "completed dialogue pages should invite the learner to continue")
|
||||
await create_timer(1.35).timeout
|
||||
_assert(screen.active_scene.is_patient_dialogue_visible(), "patient dialogue should remain until the learner advances it")
|
||||
_assert(not screen.active_scene.choice_container.visible, "questions must not appear on a timer")
|
||||
while screen.active_scene.dialogue_page_index < screen.active_scene.dialogue_pages.size() - 1:
|
||||
screen.active_scene._unhandled_input(scene_click)
|
||||
screen.active_scene._input(scene_click)
|
||||
await process_frame
|
||||
_assert(_label_content_fits(screen.active_scene.dialogue_text), "every patient response page should fit inside its speech bubble")
|
||||
screen.active_scene.complete_dialogue_reveal()
|
||||
screen.active_scene._unhandled_input(scene_click)
|
||||
screen.active_scene._input(scene_click)
|
||||
await process_frame
|
||||
_assert(not screen.active_scene.is_patient_dialogue_visible(), "questions should replace patient dialogue after the final learner click")
|
||||
_assert(screen.active_scene.choice_container.get_child_count() == 4, "the first question page should contain four choices")
|
||||
screen.active_scene._unhandled_input(scene_click)
|
||||
screen.active_scene._input(scene_click)
|
||||
_assert(screen.active_scene.choice_container.get_child_count() == 4, "scene clicks should not affect explicit question controls")
|
||||
_assert(screen.active_scene.choice_pager.visible, "eight choices should display paging controls")
|
||||
_assert(screen.active_scene.choice_page == 0, "new question sets should begin on the first page")
|
||||
|
||||
Reference in New Issue
Block a user