Skip to content

Commit

Permalink
support for dynamic locale, phetsims/graphing-quadratics#178
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jun 6, 2023
1 parent 8e3c0ec commit 3979a6e
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions js/linegame/view/SettingsNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class SettingsNode extends Node {
}, providedOptions );

// Title
const title = new Text( GraphingLinesStrings.chooseYourLevel, {
const title = new Text( GraphingLinesStrings.chooseYourLevelStringProperty, {
font: new PhetFont( 40 ),
maxWidth: 0.85 * layoutBounds.width
} );
Expand All @@ -57,6 +57,16 @@ export default class SettingsNode extends Node {
tandem: options.tandem.createTandem( 'levelSelectionButtonGroup' )
}, options.levelSelectionButtonGroupOptions ) );

// title is centered on level-selection buttons
const vBox = new VBox( {
children: [ title, levelSelectionButtonGroup ],
align: 'center',
spacing: 50
} );
vBox.boundsProperty.link( () => {
vBox.center = layoutBounds.center;
} );

// Timer and Sound controls
const timerToggleButton = new TimerToggleButton( model.timerEnabledProperty, {
stroke: 'gray',
Expand All @@ -74,13 +84,7 @@ export default class SettingsNode extends Node {
} );

options.children = [
// title and level-selection buttons centered
new VBox( {
children: [ title, levelSelectionButtonGroup ],
align: 'center',
spacing: 50,
center: layoutBounds.center
} ),
vBox,
timerToggleButton,
resetAllButton
];
Expand Down

0 comments on commit 3979a6e

Please sign in to comment.