Skip to content

Commit

Permalink
initial commit for a Timing Controls keyboard help section, see #194
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Jul 27, 2022
1 parent 535bb0d commit b407be4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
26 changes: 26 additions & 0 deletions js/common/view/GreenhouseEffectKeyboardHelpContent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2022, University of Colorado Boulder

/**
* The contents of the
* @author Jesse Greenberg (PhET Interactive Simulations)
*/

import BasicActionsKeyboardHelpSection from '../../../../scenery-phet/js/keyboard/help/BasicActionsKeyboardHelpSection.js';
import SliderControlsKeyboardHelpSection from '../../../../scenery-phet/js/keyboard/help/SliderControlsKeyboardHelpSection.js';
import TwoColumnKeyboardHelpContent from '../../../../scenery-phet/js/keyboard/help/TwoColumnKeyboardHelpContent.js';
import TimingControlsKeyboardHelpSection from '../../../../scenery-phet/js/keyboard/help/TimingControlsKeyboardHelpSection.js';
import greenhouseEffect from '../../greenhouseEffect.js';

class GreenhouseEffectKeyboardHelpContent extends TwoColumnKeyboardHelpContent {
public constructor() {
const sliderHelpSection = new SliderControlsKeyboardHelpSection();
const basicActionsHelpSection = new BasicActionsKeyboardHelpSection();

const timingControlsHelpSection = new TimingControlsKeyboardHelpSection();

super( [ sliderHelpSection, timingControlsHelpSection ], [ basicActionsHelpSection ] );
}
}

greenhouseEffect.register( 'GreenhouseEffectKeyboardHelpContent', GreenhouseEffectKeyboardHelpContent );
export default GreenhouseEffectKeyboardHelpContent;
4 changes: 2 additions & 2 deletions js/waves/WavesScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import greenhouseEffectStrings from '../greenhouseEffectStrings.js';
import WavesModel from './model/WavesModel.js';
import WavesScreenView from './view/WavesScreenView.js';
import Tandem from '../../../tandem/js/Tandem.js';
import SliderControlsAndBasicActionsKeyboardHelpContent from '../../../scenery-phet/js/keyboard/help/SliderControlsAndBasicActionsKeyboardHelpContent.js';
import GreenhouseEffectKeyboardHelpContent from '../common/view/GreenhouseEffectKeyboardHelpContent.js';

class WavesScreen extends Screen<WavesModel, WavesScreenView> {

Expand All @@ -26,7 +26,7 @@ class WavesScreen extends Screen<WavesModel, WavesScreenView> {
tandem: tandem,
name: greenhouseEffectStrings.screen.waves,
descriptionContent: greenhouseEffectStrings.a11y.waves.homeScreenDescription,
keyboardHelpNode: new SliderControlsAndBasicActionsKeyboardHelpContent()
keyboardHelpNode: new GreenhouseEffectKeyboardHelpContent()
};

super(
Expand Down

0 comments on commit b407be4

Please sign in to comment.