Skip to content

Commit

Permalink
always create Solve button
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Mar 2, 2021
1 parent 6d5a2ed commit d870158
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions js/waveGame/view/WaveGameLevelNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,20 @@ class WaveGameLevelNode extends Node {
nextButton
];

// When the ?showAnswers query parameter is present, add a button for immediately solving the challenge.
let solveButton = null;
// Solve button immediately solves the challenge. It's for development and QA, and is added to the
// scenegraph only when the ?showAnswers query parameter is present.
const solveButton = new RectangularPushButton( {
content: new Text( 'Solve', {
font: DEFAULT_FONT,
fill: 'white'
} ),
baseColor: 'red',
listener: () => {
this.interruptSubtreeInput();
level.solve();
}
} );
if ( phet.chipper.queryParameters.showAnswers ) {
solveButton = new RectangularPushButton( {
content: new Text( 'Solve', {
font: DEFAULT_FONT,
fill: 'white'
} ),
baseColor: 'red',
listener: () => {
this.interruptSubtreeInput();
level.solve();
}
} );
controlPanelChildren.push( solveButton );
}

Expand Down

0 comments on commit d870158

Please sign in to comment.