From cc94b26a7410e4e90e1f7f41ff0546cbda0f9638 Mon Sep 17 00:00:00 2001 From: Jesse Date: Wed, 17 Mar 2021 16:01:27 -0400 Subject: [PATCH] use voicing utteranceQueue in Display --- js/tracking/SaveTestEventsButton.js | 2 +- js/view/CustomGestureIntroDialog.js | 18 +++++++++--------- js/view/GestureControlledSlider.js | 6 +++--- js/view/SelfVoicingLandingDialog.js | 2 +- js/view/ValueGestureControl.js | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/js/tracking/SaveTestEventsButton.js b/js/tracking/SaveTestEventsButton.js index 7336d62..30f616f 100644 --- a/js/tracking/SaveTestEventsButton.js +++ b/js/tracking/SaveTestEventsButton.js @@ -59,7 +59,7 @@ class SaveTestEventsButton extends RectangularPushButton { this.addInputListener( new SelfVoicingInputListener( { onFocusIn: () => { const response = levelSpeakerModel.collectResponses( BUTTON_OBJECT_RESPONSE ); - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( response ); + phet.joist.sim.voicingUtteranceQueue.addToBack( response ); }, highlightTarget: this } ) ); diff --git a/js/view/CustomGestureIntroDialog.js b/js/view/CustomGestureIntroDialog.js index 1dbec7a..aa707d0 100644 --- a/js/view/CustomGestureIntroDialog.js +++ b/js/view/CustomGestureIntroDialog.js @@ -72,7 +72,7 @@ class CustomGestureIntroDialog extends Dialog { alert: dialogDescriptionString, cancelOther: false } ); - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( utterance ); + phet.joist.sim.voicingUtteranceQueue.addToBack( utterance ); }; // a wrapper that surrounds the descriptionParagraph with a Node that is focusable @@ -89,7 +89,7 @@ class CustomGestureIntroDialog extends Dialog { const exampleButton = new TextPushButton( testButtonContent, { font: contentFont, listener: () => { - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( pressedString ); + phet.joist.sim.voicingUtteranceQueue.addToBack( pressedString ); } } ); @@ -122,19 +122,19 @@ class CustomGestureIntroDialog extends Dialog { // listeners that provide actual self-voicing content on the example components exampleButton.addInputListener( new SelfVoicingInputListener( { onFocusIn: () => { - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( testButtonContent ); + phet.joist.sim.voicingUtteranceQueue.addToBack( testButtonContent ); } } ) ); exampleSlider.addInputListener( new SelfVoicingInputListener( { onFocusIn: () => { - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( sliderLabelString ); + phet.joist.sim.voicingUtteranceQueue.addToBack( sliderLabelString ); } } ) ); continueButton.addInputListener( new SelfVoicingInputListener( { onFocusIn: () => { - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( continueButtonContent ); + phet.joist.sim.voicingUtteranceQueue.addToBack( continueButtonContent ); } } ) ); @@ -144,19 +144,19 @@ class CustomGestureIntroDialog extends Dialog { manipulation: sliderInteractionHintString } ); - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( hintString ); + phet.joist.sim.voicingUtteranceQueue.addToBack( hintString ); } } ); const valueChangeUtterance = new SelfVoicingUtterance(); exampleSliderProperty.lazyLink( value => { valueChangeUtterance.alert = `${value}`; - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( valueChangeUtterance ); + phet.joist.sim.voicingUtteranceQueue.addToBack( valueChangeUtterance ); } ); let positionOnValueChange = null; exampleSlider.swipeStart = event => { - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( grabbedAlertString ); + phet.joist.sim.voicingUtteranceQueue.addToBack( grabbedAlertString ); positionOnValueChange = event.pointer.point; }; exampleSlider.swipeEnd = () => { @@ -164,7 +164,7 @@ class CustomGestureIntroDialog extends Dialog { cancelOther: false, alert: releasedString } ); - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( releasedAlert ); + phet.joist.sim.voicingUtteranceQueue.addToBack( releasedAlert ); }; exampleSlider.swipeMove = event => { const nextSwipePosition = event.pointer.point; diff --git a/js/view/GestureControlledSlider.js b/js/view/GestureControlledSlider.js index 7e0b0d6..3f22fe3 100644 --- a/js/view/GestureControlledSlider.js +++ b/js/view/GestureControlledSlider.js @@ -45,7 +45,7 @@ class GestureControlledSlider extends Slider { // called on the beginning of a swipe gesture, by SwipeListeners onSwipeStart: () => { - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( grabbedAlertString ); + phet.joist.sim.voicingUtteranceQueue.addToBack( grabbedAlertString ); }, // called at the end of a swipe gesture, by SwipeListener @@ -57,7 +57,7 @@ class GestureControlledSlider extends Slider { alert: releasedString, cancelOther: false } ); - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( releasedUtterance ); + phet.joist.sim.voicingUtteranceQueue.addToBack( releasedUtterance ); } }, options ); @@ -70,7 +70,7 @@ class GestureControlledSlider extends Slider { const objectContent = options.selfVoicingLabel; const response = levelSpeakerModel.collectResponses( objectContent ); - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( response ); + phet.joist.sim.voicingUtteranceQueue.addToBack( response ); } } ) ); } diff --git a/js/view/SelfVoicingLandingDialog.js b/js/view/SelfVoicingLandingDialog.js index 4b40694..5af7819 100644 --- a/js/view/SelfVoicingLandingDialog.js +++ b/js/view/SelfVoicingLandingDialog.js @@ -81,7 +81,7 @@ class SelfVoicingLandingDialog extends Dialog { // to add code to Dialog, and I didn't want to work in a branch so this is here for now Display.focusProperty.lazyLink( focus => { if ( focus && focus.trail.lastNode().innerContent === 'Close' ) { - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( 'Close' ); + phet.joist.sim.voicingUtteranceQueue.addToBack( 'Close' ); } } ); } diff --git a/js/view/ValueGestureControl.js b/js/view/ValueGestureControl.js index 164a2f3..c0fb865 100644 --- a/js/view/ValueGestureControl.js +++ b/js/view/ValueGestureControl.js @@ -106,7 +106,7 @@ const ValueGestureControl = { manipulation: changeValueString } ); const response = levelSpeakerModel.collectResponses( interactionHint ); - phet.joist.sim.selfVoicingUtteranceQueue.addToBack( response ); + phet.joist.sim.voicingUtteranceQueue.addToBack( response ); } } ); }