Skip to content

Commit

Permalink
refactor sims to use screen-based keyboard help content, phetsims/joi…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Oct 5, 2020
1 parent 9c3d5e4 commit a19579b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 2 additions & 5 deletions js/molecules-and-light-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@ import Sim from '../../joist/js/Sim.js';
import simLauncher from '../../joist/js/simLauncher.js';
import platform from '../../phet-core/js/platform.js';
import Tandem from '../../tandem/js/Tandem.js';
import MoleculesAndLightKeyboardHelpContent from './common/view/MoleculesAndLightKeyboardHelpContent.js';
import moleculesAndLightStrings from './moleculesAndLightStrings.js';
import MoleculesAndLightScreen from './moleculesandlight/MoleculesAndLightScreen.js';
import moleculesAndLightStrings from './moleculesAndLightStrings.js';

const moleculesAndLightTitleString = moleculesAndLightStrings[ 'molecules-and-light' ].title;

const keyboardHelpContent = new MoleculesAndLightKeyboardHelpContent();

const simOptions = {
keyboardHelpNode: keyboardHelpContent,
hasKeyboardHelpContent: true,

credits: {
leadDesign: 'Kelly Lancaster (Java), Amy Rouinfar (HTML5)',
Expand Down
4 changes: 3 additions & 1 deletion js/moleculesandlight/MoleculesAndLightScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import Property from '../../../axon/js/Property.js';
import Screen from '../../../joist/js/Screen.js';
import MoleculesAndLightKeyboardHelpContent from '../common/view/MoleculesAndLightKeyboardHelpContent.js';
import moleculesAndLight from '../moleculesAndLight.js';
import MoleculesAndLightModel from './model/MoleculesAndLightModel.js';
import MoleculesAndLightScreenView from './view/MoleculesAndLightScreenView.js';
Expand All @@ -23,7 +24,8 @@ class MoleculesAndLightScreen extends Screen {
function() { return new MoleculesAndLightModel( tandem.createTandem( 'model' ) ); },
function( model ) { return new MoleculesAndLightScreenView( model, tandem.createTandem( 'view' ) ); }, {
backgroundColorProperty: new Property( '#C5D6E8' ),
tandem: tandem
tandem: tandem,
keyboardHelpNode: new MoleculesAndLightKeyboardHelpContent()
}
);
}
Expand Down

0 comments on commit a19579b

Please sign in to comment.