phetsims / sun

User-interface components for PhET simulations, built on top of Scenery.
MIT License
4 stars 12 forks source link

Add support for sound to `CarouselComboBox` #891

Closed jbphet closed 1 month ago

jbphet commented 1 month ago

The CarouselComboBox UI component is currently not used much, if any, in sims, but it is used in a number of demos, such as the scenery-phet and tambo demos. It currently doesn't generate any sound, which feels weird in the tambo demo, since tambo is all about sound. It would be nice to add sound support to it.

jbphet commented 1 month ago

I've added rudimentary support for sound generation - just a basic open and close sound. It seems to work fine in both the tambo and scenery-phet demos, and feels much better to me than no sound at all. I didn't want to take the time to implement an equivalent scheme to ComboBox, where a different sound is played when the user changes the selection, because it seemed unnecessary at this point.

@pixelzoom - You were the main author of this component. You cool with this?

pixelzoom commented 1 month ago

Looks good to me!

Back to @jbphet in case there's more to do.