Skip to content

Commit

Permalink
add up/down arrows for handles, #215
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Apr 17, 2024
1 parent d636676 commit 9a4049e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions js/common/view/MoveHandlesKeyboardHelpSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ export default class MoveHandlesKeyboardHelpSection extends KeyboardHelpSection

public constructor() {

const leftRightArrowsIcon = KeyboardHelpIconFactory.leftRightArrowKeysRowIcon();
const upDownArrowsIcon = KeyboardHelpIconFactory.upDownArrowKeysRowIcon();

// Move [<][>]
const leftRightArrowKeysRowIcon = KeyboardHelpIconFactory.leftRightArrowKeysRowIcon();
const moveRow = KeyboardHelpSectionRow.labelWithIcon( SceneryPhetStrings.keyboardHelpDialog.moveStringProperty, leftRightArrowKeysRowIcon );
const leftRightOrUpDownArrowsIcon = KeyboardHelpIconFactory.iconOrIcon( leftRightArrowsIcon, upDownArrowsIcon );
const moveRow = KeyboardHelpSectionRow.labelWithIcon( SceneryPhetStrings.keyboardHelpDialog.moveStringProperty, leftRightOrUpDownArrowsIcon );

// Move slower [Shift]+[<\][>]
const shiftPlusLeftRightIcon = KeyboardHelpIconFactory.shiftPlusIcon( leftRightArrowKeysRowIcon );
const moveSlowerRow = KeyboardHelpSectionRow.labelWithIcon( SceneryPhetStrings.keyboardHelpDialog.moveSlowerStringProperty, shiftPlusLeftRightIcon );
const shiftPlusLeftRightIcon = KeyboardHelpIconFactory.shiftPlusIcon( leftRightArrowsIcon );
const shiftPlusUpDownIcon = KeyboardHelpIconFactory.shiftPlusIcon( upDownArrowsIcon );
const moveSlowerRow = KeyboardHelpSectionRow.labelWithIconList( SceneryPhetStrings.keyboardHelpDialog.moveSlowerStringProperty,
[ shiftPlusLeftRightIcon, shiftPlusUpDownIcon ] );

super( GasPropertiesStrings.keyboardHelpDialog.moveHandlesStringProperty, [ moveRow, moveSlowerRow ] );
}
Expand Down

0 comments on commit 9a4049e

Please sign in to comment.