From 9dc20c6b063b014de91e198556cb6f34e85f393f Mon Sep 17 00:00:00 2001 From: zepumph Date: Mon, 5 Oct 2020 12:39:11 -0800 Subject: [PATCH] refactor sims to use screen-based keyboard help content, https://github.com/phetsims/joist/issues/668 --- js/molarity-main.js | 9 +++------ js/molarity/MolarityScreen.js | 4 +++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/js/molarity-main.js b/js/molarity-main.js index eec24855..21a517ba 100644 --- a/js/molarity-main.js +++ b/js/molarity-main.js @@ -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', @@ -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() { diff --git a/js/molarity/MolarityScreen.js b/js/molarity/MolarityScreen.js index 27c88763..abde5cd5 100644 --- a/js/molarity/MolarityScreen.js +++ b/js/molarity/MolarityScreen.js @@ -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 { @@ -19,7 +20,8 @@ class MolarityScreen extends Screen { constructor( tandem ) { const options = { - tandem: tandem + tandem: tandem, + keyboardHelpNode: new MolarityKeyboardHelpContent() }; super(