phetsims / vegas

Reusable game components for PhET simulations.
MIT License
1 stars 4 forks source link

LevelCompletedNode and AllLevelsCompleted should be Dialogs #110

Open pixelzoom opened 2 years ago

pixelzoom commented 2 years ago

LevelCompletedNode should be a modal Dialog. It's currently a subclass of Panel. Unless you write sim-specific code, the user can still interact with the sim while it's displayed. And clicking outside of it does not dismiss it. There's no close (X) button. And the programming API is totally different.

For example, in vegas demo, I can still interact with all of the controls behind this pseudo-dialog, and I have to press 'Continue' to make it disappear.

screenshot_1778

LevelCompletedNode is used in sims that have games with a finite number of challenges. That currently includes:

pixelzoom commented 2 years ago

AllLevelsCompletedNode has the same problems, and should be a Dialog. It is used by:

pixelzoom commented 2 years ago

I took a running start at this, and it's going to be a big chunk of work, easily an entire day. And there are PhET-iO issues to deal with -- which we haven't encountered only because a "finite challenges" sim has not been instrumented yet. So I'm unassigning for now. This will probably need to be addressed when any of the sims notes above needs to be republished.