From e4efd31772a5ba6340be73465e651a0da5dffc16 Mon Sep 17 00:00:00 2001 From: Jesse Date: Tue, 3 Jan 2023 12:10:59 -0500 Subject: [PATCH] check shape row is only visible when Voicing is supported, see #249 --- js/quadrilateral/view/ShapeShortcutsHelpSection.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/quadrilateral/view/ShapeShortcutsHelpSection.ts b/js/quadrilateral/view/ShapeShortcutsHelpSection.ts index bfdceb98..516a9021 100644 --- a/js/quadrilateral/view/ShapeShortcutsHelpSection.ts +++ b/js/quadrilateral/view/ShapeShortcutsHelpSection.ts @@ -12,6 +12,7 @@ import KeyboardHelpSection from '../../../../scenery-phet/js/keyboard/help/Keybo import KeyboardHelpSectionRow from '../../../../scenery-phet/js/keyboard/help/KeyboardHelpSectionRow.js'; import LetterKeyNode from '../../../../scenery-phet/js/keyboard/LetterKeyNode.js'; import TextKeyNode from '../../../../scenery-phet/js/keyboard/TextKeyNode.js'; +import { voicingManager } from '../../../../scenery/js/imports.js'; import quadrilateral from '../../quadrilateral.js'; import QuadrilateralStrings from '../../QuadrilateralStrings.js'; @@ -43,7 +44,13 @@ class ShapeShortcutsHelpSection extends KeyboardHelpSection { ) ); - super( QuadrilateralStrings.keyboardHelpDialog.shapeShortcuts, [ checkShapeRow, resetShapeRow ] ); + const contents = []; + if ( voicingManager.initialized ) { + contents.push( checkShapeRow ); + } + contents.push( resetShapeRow ); + + super( QuadrilateralStrings.keyboardHelpDialog.shapeShortcuts, contents ); } }