-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sound is missing from RoundToggleButton. #895
Comments
It looks like sun buttons are in the (bad) habit of duplicating sound code in the round vs rectangular versions of buttons. For example, RectangularPushButton and RoundPushButton both contain these duplicated lines of code: type SelfOptions = {
soundPlayer?: TSoundPlayer;
};
soundPlayer: sharedSoundPlayers.get( 'pushButton' ),
// sound generation
const playSound = () => { options.soundPlayer.play(); };
pushButtonModel.produceSoundEmitter.addListener( playSound );
pushButtonModel.produceSoundEmitter.removeListener( playSound ); Unfortunately, I don't see any easy option but to follow this same pattern of duplication (for now) with RectangularToggleButton and RoundToggleButton. |
Sorry @pixelzoom I am confused, I see sounds in RoundToggleButton here: sun/js/buttons/RoundToggleButton.ts Lines 47 to 48 in 99ac78e
Is there a sim or place where this isn't working? |
Hmm.... My bad. Not sure what I was looking at. I was probably confusing this RectangularStickyToggleButton, which I see @jessegreenberg fixed up in b8622cb on 9/26. Sorry for the bother, closing. |
Discovered while working on alt input for momentary toggle buttons in #796.
In 1df861f, @samreid added sound to RectangularToggleButton, but did not add sound to RoundToggleButton. I see no reason why the sound should be different because a button is rectangular vs round, so labeling this as a bug.
The text was updated successfully, but these errors were encountered: