diff --git a/gravity-force-lab-strings_en.json b/gravity-force-lab-strings_en.json index 7ad6e859..3bf90b1d 100644 --- a/gravity-force-lab-strings_en.json +++ b/gravity-force-lab-strings_en.json @@ -26,6 +26,9 @@ "moveSphereLabel": { "value": "Move sphere" }, + "moveInSmallerSteps": { + "value": "Move in smaller steps" + }, "moveInLargerSteps": { "value": "Move in larger steps" }, @@ -47,6 +50,9 @@ "changeMassInLargerSteps": { "value": "Change mass in larger steps" }, + "changeMassInSmallerSteps": { + "value": "Change mass in smaller steps" + }, "jumpToMaximumMass": { "value": "Jump to maximum mass" }, diff --git a/js/gravity-force-lab/GravityForceLabA11yStrings.js b/js/gravity-force-lab/GravityForceLabA11yStrings.js index 33cc060a..aeaf2b76 100644 --- a/js/gravity-force-lab/GravityForceLabA11yStrings.js +++ b/js/gravity-force-lab/GravityForceLabA11yStrings.js @@ -98,6 +98,9 @@ define( require => { moveSphereDescription: { value: 'Move sphere left and right with the Left and Right Arrow keys.' }, + moveInSmallerStepsDescription: { + value: 'Move in smaller steps with shift plus arrow keys.' + }, moveInLargerStepsDescription: { value: 'Move in larger steps with Page Up and Page Down keys.' }, @@ -116,6 +119,9 @@ define( require => { changeMassInLargerStepsDescription: { value: 'Change mass in larger steps with Page Up and Page Down keys.' }, + changeMassInSmallerStepsDescription: { + value: 'Change mass in smaller steps with shift plus arrow keys.' + }, jumpToMaximumMassDescription: { value: 'Jump to maximum mass with End key.' }, diff --git a/js/gravity-force-lab/view/GravityForceLabKeyboardHelpContent.js b/js/gravity-force-lab/view/GravityForceLabKeyboardHelpContent.js index cb22dbc6..7081615a 100644 --- a/js/gravity-force-lab/view/GravityForceLabKeyboardHelpContent.js +++ b/js/gravity-force-lab/view/GravityForceLabKeyboardHelpContent.js @@ -25,24 +25,28 @@ define( function( require ) { // strings var changeMassHeadingString = require( 'string!GRAVITY_FORCE_LAB/changeMassHeading' ); var changeMassInLargerStepsString = require( 'string!GRAVITY_FORCE_LAB/changeMassInLargerSteps' ); + var changeMassInSmallerStepsString = require( 'string!GRAVITY_FORCE_LAB/changeMassInSmallerSteps' ); var decreaseMassString = require( 'string!GRAVITY_FORCE_LAB/decreaseMass' ); var increaseMassString = require( 'string!GRAVITY_FORCE_LAB/increaseMass' ); var jumpToLeftString = require( 'string!GRAVITY_FORCE_LAB/jumpToLeft' ); var jumpToMaximumMassString = require( 'string!GRAVITY_FORCE_LAB/jumpToMaximumMass' ); var jumpToMinimumMassString = require( 'string!GRAVITY_FORCE_LAB/jumpToMinimumMass' ); var jumpToRightString = require( 'string!GRAVITY_FORCE_LAB/jumpToRight' ); + var moveInSmallerStepsString = require( 'string!GRAVITY_FORCE_LAB/moveInSmallerSteps' ); var moveInLargerStepsString = require( 'string!GRAVITY_FORCE_LAB/moveInLargerSteps' ); var moveSphereLabelString = require( 'string!GRAVITY_FORCE_LAB/moveSphereLabel' ); var moveSpheresHeadingString = require( 'string!GRAVITY_FORCE_LAB/moveSpheresHeading' ); // a11y strings var moveSphereDescriptionString = GravityForceLabA11yStrings.moveSphereDescription.value; + var moveInSmallerStepsDescriptionString = GravityForceLabA11yStrings.moveInSmallerStepsDescription.value; var moveInLargerStepsDescriptionString = GravityForceLabA11yStrings.moveInLargerStepsDescription.value; var jumpToLeftDescriptionString = GravityForceLabA11yStrings.jumpToLeftDescription.value; var jumpToRightDescriptionString = GravityForceLabA11yStrings.jumpToRightDescription.value; var increaseMassDescriptionString = GravityForceLabA11yStrings.increaseMassDescription.value; var decreaseMassDescriptionString = GravityForceLabA11yStrings.decreaseMassDescription.value; var changeMassInLargerStepsDescriptionString = GravityForceLabA11yStrings.changeMassInLargerStepsDescription.value; + var changeMassInSmallerStepsDescriptionString = GravityForceLabA11yStrings.changeMassInSmallerStepsDescription.value; var jumpToMaximumMassDescriptionString = GravityForceLabA11yStrings.jumpToMaximumMassDescription.value; var jumpToMinimumMassDescriptionString = GravityForceLabA11yStrings.jumpToMinimumMassDescription.value; @@ -71,6 +75,12 @@ define( function( require ) { }, pageUpPageDown: function() { return HelpContent.pageUpPageDownRowIcon(); + }, + shiftPlusArrows: function() { + return HelpContent.shiftPlusIcon( HelpContent.leftRightArrowKeysRowIcon() ); + }, + shiftPlusAllArrows: function() { + return HelpContent.shiftPlusIcon( HelpContent.arrowKeysRowIcon() ); } }; @@ -86,6 +96,7 @@ define( function( require ) { // move mass content var moveMassRow = this.constructRow( moveSphereLabelString, moveSphereDescriptionString, 'leftRight' ); + var moveSmallStepsRow = this.constructRow( moveInSmallerStepsString, moveInSmallerStepsDescriptionString, 'shiftPlusArrows' ); // 'move in larger steps' content var moveLargeStepsRow = this.constructRow( moveInLargerStepsString, moveInLargerStepsDescriptionString, 'pageUpPageDown' ); @@ -95,17 +106,18 @@ define( function( require ) { // 'jump to right' content var jumpRightRow = this.constructRow( jumpToRightString, jumpToRightDescriptionString, 'end' ); - var moveMassRows = [ moveMassRow, moveLargeStepsRow, jumpLeftRow, jumpRightRow ]; + var moveMassRows = [ moveMassRow, moveSmallStepsRow, moveLargeStepsRow, jumpLeftRow, jumpRightRow ]; var moveMassHelpContent = new HelpContent( moveSpheresHeadingString, moveMassRows ); // Mass adjustment help section var increaseMassRow = this.constructRow( increaseMassString, increaseMassDescriptionString, 'upOrRight' ); var decreaseMassRow = this.constructRow( decreaseMassString, decreaseMassDescriptionString, 'downOrLeft' ); + var changeMassSmallStepsRow = this.constructRow( changeMassInSmallerStepsString, changeMassInSmallerStepsDescriptionString, 'shiftPlusAllArrows' ); var changeMassLargeStepsRow = this.constructRow( changeMassInLargerStepsString, changeMassInLargerStepsDescriptionString, 'pageUpPageDown' ); var jumpToMinMassRow = this.constructRow( jumpToMinimumMassString, jumpToMinimumMassDescriptionString, 'home' ); var jumpToMaxMassRow = this.constructRow( jumpToMaximumMassString, jumpToMaximumMassDescriptionString, 'end' ); - var adjustMassRows = [ increaseMassRow, decreaseMassRow, changeMassLargeStepsRow, jumpToMinMassRow, jumpToMaxMassRow ]; + var adjustMassRows = [ increaseMassRow, decreaseMassRow, changeMassSmallStepsRow, changeMassLargeStepsRow, jumpToMinMassRow, jumpToMaxMassRow ]; var adjustMassHelpContent = new HelpContent( changeMassHeadingString, adjustMassRows ); // align icons for the mass movement and adjustment sections