Skip to content

Commit

Permalink
Only show light sound effect button when ?fullSonification, see phets…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jul 30, 2019
1 parent 5a078dd commit d2479f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/common/view/WaveInterferenceControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ define( require => {
const intensityString = require( 'string!WAVE_INTERFERENCE/intensity' );
const playToneString = require( 'string!WAVE_INTERFERENCE/playTone' );
const screenString = require( 'string!WAVE_INTERFERENCE/screen' );
const soundEffectString = require( 'string!WAVE_INTERFERENCE/soundEffect' );

class WaveInterferenceControlPanel extends WaveInterferencePanel {

Expand Down Expand Up @@ -172,7 +173,7 @@ define( require => {

const createLightSonificationCheckbox = () => {
return new WaveInterferenceCheckbox(
new WaveInterferenceText( 'Sound Effect' ),
new WaveInterferenceText( soundEffectString ),
model.lightScene.soundEffectEnabledProperty, {
audioEnabled: options.supportsSound,
top: screenCheckbox.bottom + CHECKBOX_SPACING,
Expand Down Expand Up @@ -202,7 +203,7 @@ define( require => {
// Screen & Intensity graph should only be available for light scenes. Remove it from water and sound.
...( scene === model.lightScene ? [ screenCheckbox ] : [] ),
...( scene === model.lightScene && options.showIntensityCheckbox ? [ intensityCheckbox ] : [] ),
...( scene === model.lightScene && WaveInterferenceQueryParameters.lightSonificationCheckbox ? [ createLightSonificationCheckbox() ] : [] )
...( scene === model.lightScene && WaveInterferenceQueryParameters.fullSonification && WaveInterferenceQueryParameters.lightSonificationCheckbox ? [ createLightSonificationCheckbox() ] : [] )
];
} );

Expand Down
3 changes: 3 additions & 0 deletions wave-interference-strings_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,8 @@
},
"lightGenerator": {
"value": "Light Generator"
},
"soundEffect": {
"value": "Sound Effect"
}
}

0 comments on commit d2479f9

Please sign in to comment.