Skip to content

Commit

Permalink
use the generalCloseSoundPlayer for the CLoseButton, see #859
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Jun 26, 2024
1 parent d78c77f commit 8106781
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/buttons/CloseButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import RectangularPushButton, { RectangularPushButtonOptions } from '../../../su
import PhetColorScheme from '../PhetColorScheme.js';
import sceneryPhet from '../sceneryPhet.js';
import SceneryPhetStrings from '../SceneryPhetStrings.js';
import generalCloseSoundPlayer from '../../../tambo/js/shared-sound-players/generalCloseSoundPlayer.js';

type SelfOptions = {
iconLength?: number; // length of the 'X' icon, whose bounds are square
Expand Down Expand Up @@ -43,6 +44,9 @@ export default class CloseButton extends RectangularPushButton {
xMargin: 4, // {number} x margin around the icon
yMargin: 4, // {number} y margin around the icon

// sound
soundPlayer: generalCloseSoundPlayer,

// pdom
innerContent: SceneryPhetStrings.a11y.closeStringProperty,

Expand Down

0 comments on commit 8106781

Please sign in to comment.