Skip to content

Commit

Permalink
use messageText for dialog messages, #323
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Sep 2, 2022
1 parent 00a44ff commit dc8d862
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions js/common/view/DiedDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ class DiedDialog extends Dialog {
phetioDocumentation: 'This dialog is displayed when all of the bunnies have died.'
}, options );

const textNode = new Text( naturalSelectionStrings.allOfTheBunniesHaveDiedStringProperty, {
const messageText = new Text( naturalSelectionStrings.allOfTheBunniesHaveDiedStringProperty, {
font: NaturalSelectionConstants.DIALOG_FONT,
maxWidth: 450, // determined empirically
tandem: options.tandem.createTandem( 'textNode' ),
tandem: options.tandem.createTandem( 'messageText' ),
phetioVisiblePropertyInstrumented: false
} );

super( textNode, options );
super( messageText, options );
}
}

Expand Down
6 changes: 3 additions & 3 deletions js/common/view/WorldDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ class WorldDialog extends Dialog {
scale: 0.8 // determined empirically
} );

const textNode = new Text( naturalSelectionStrings.bunniesHaveTakenOverTheWorldStringProperty, {
const messageText = new Text( naturalSelectionStrings.bunniesHaveTakenOverTheWorldStringProperty, {
font: NaturalSelectionConstants.DIALOG_FONT,
fill: 'white',
maxWidth: worldNode.width,
tandem: options.tandem.createTandem( 'textNode' ),
tandem: options.tandem.createTandem( 'messageText' ),
phetioVisiblePropertyInstrumented: false
} );

const content = new VBox( {
spacing: 25,
align: 'center',
children: [ textNode, worldNode ]
children: [ messageText, worldNode ]
} );

super( content, options );
Expand Down

0 comments on commit dc8d862

Please sign in to comment.