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 0be2699 commit 9dc20c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 3 additions & 6 deletions js/molarity-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@
import Sim from '../../joist/js/Sim.js';
import simLauncher from '../../joist/js/simLauncher.js';
import Tandem from '../../tandem/js/Tandem.js';
import molarityStrings from './molarityStrings.js';
import MolarityScreen from './molarity/MolarityScreen.js';
import MolarityKeyboardHelpContent from './molarity/view/MolarityKeyboardHelpContent.js';
import molarityStrings from './molarityStrings.js';

const molarityTitleString = molarityStrings.molarity.title;

// constants
const tandem = Tandem.ROOT;

// help content to describe keyboard interactions
const keyboardHelpContent = new MolarityKeyboardHelpContent();

const options = {
credits: {
leadDesign: 'Julia Chamberlain',
Expand All @@ -29,7 +25,8 @@ const options = {
soundDesign: 'Ashton Morris',
qualityAssurance: 'Jaspe Arias, Logan Bray, Steele Dalton, Alex Dornan, Ethan Johnson, Megan Lai, Elise Morgan, Liam Mulhall, Oliver Orejola, Jacob Romero, Kathryn Woessner, Bryan Yoelin'
},
keyboardHelpNode: keyboardHelpContent
hasKeyboardHelpContent: true

};

simLauncher.launch( function() {
Expand Down
4 changes: 3 additions & 1 deletion js/molarity/MolarityScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import Screen from '../../../joist/js/Screen.js';
import molarity from '../molarity.js';
import MolarityModel from './model/MolarityModel.js';
import MolarityKeyboardHelpContent from './view/MolarityKeyboardHelpContent.js';
import MolarityScreenView from './view/MolarityScreenView.js';

class MolarityScreen extends Screen {
Expand All @@ -19,7 +20,8 @@ class MolarityScreen extends Screen {
constructor( tandem ) {

const options = {
tandem: tandem
tandem: tandem,
keyboardHelpNode: new MolarityKeyboardHelpContent()
};

super(
Expand Down

0 comments on commit 9dc20c6

Please sign in to comment.