Skip to content

Commit

Permalink
check shape row is only visible when Voicing is supported, see #249
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Jan 3, 2023
1 parent 2f934b2 commit e4efd31
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/quadrilateral/view/ShapeShortcutsHelpSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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 );
}
}

Expand Down

0 comments on commit e4efd31

Please sign in to comment.