Skip to content

Commit

Permalink
basic content for the help dialog, see #249
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Oct 18, 2022
1 parent facf5ab commit 398035c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
3 changes: 3 additions & 0 deletions js/quadrilateral-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ const simOptions: SimOptions = {
thanks: ''
},

//
hasKeyboardHelpContent: true,

// preferences configuration with defaults from package.json
preferencesModel: new PreferencesModel( {
simulationOptions: {
Expand Down
4 changes: 3 additions & 1 deletion js/quadrilateral/QuadrilateralScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ import QuadrilateralModel from './model/QuadrilateralModel.js';
import QuadrilateralScreenView from './view/QuadrilateralScreenView.js';
import QuadrilateralPreferencesModel from './model/QuadrilateralPreferencesModel.js';
import optionize, { EmptySelfOptions } from '../../../phet-core/js/optionize.js';
import QuadrilateralKeyboardHelpContent from './view/QuadrilateralKeyboardHelpContent.js';

class QuadrilateralScreen extends Screen<QuadrilateralModel, QuadrilateralScreenView> {
public constructor( preferencesModel: QuadrilateralPreferencesModel, providedOptions: ScreenOptions ) {

const options = optionize<ScreenOptions, EmptySelfOptions, ScreenOptions>()( {
backgroundColorProperty: QuadrilateralColors.screenBackgroundColorProperty
backgroundColorProperty: QuadrilateralColors.screenBackgroundColorProperty,
keyboardHelpNode: new QuadrilateralKeyboardHelpContent()
}, providedOptions );

super(
Expand Down
24 changes: 24 additions & 0 deletions js/quadrilateral/view/QuadrilateralKeyboardHelpContent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright 2022, University of Colorado Boulder

/**
* The keyboard help content for the Quadrilateral sim. This has yet to be designed and is just ready for more content.
* TODO: Finish this in https://github.com/phetsims/quadrilateral/issues/249
*
* @author Jesse Greenberg (PhET Interactive Simulations)
*/

import quadrilateral from '../../quadrilateral.js';
import BasicActionsKeyboardHelpSection from '../../../../scenery-phet/js/keyboard/help/BasicActionsKeyboardHelpSection.js';
import { Node } from '../../../../scenery/js/imports.js';

class QuadrilateralKeyboardHelpContent extends Node {
public constructor() {
const generalContent = new BasicActionsKeyboardHelpSection();
super( {
children: [ generalContent ]
} );
}
}

quadrilateral.register( 'QuadrilateralKeyboardHelpContent', QuadrilateralKeyboardHelpContent );
export default QuadrilateralKeyboardHelpContent;

0 comments on commit 398035c

Please sign in to comment.