phetsims / vegas

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

time display causes contents of FiniteStatusBar to shift #76

Open pixelzoom opened 5 years ago

pixelzoom commented 5 years ago

This is a general issue, originally reported in https://github.com/phetsims/balancing-chemical-equations/issues/136.

With stringTest=double, the time display in the game status bar shifts around.

Steps to reproduce:

  1. Start the sim with stringTest=double
  2. Go to the game screen and turn on the timer.
  3. Start a game and watch the timer.
  4. When the time changes from 0:10 to 0:11, the contents of the bar will shift right.
  5. When the time changes from 0:11 to 0:12 the contents of the bar will shift left.

Example:

elevenseconds

This was originally reported on Win10 + Chrome 71. I could not reproduce on macOS 10.11.6 + Chrome 71. But I did reproduce on macOS 10.11.6 + Safari 11 + Firefox 63. It's reproducible in any sim that uses FiniteStatusBar (e.g. RPAL, BCE)

This is a general issue with VEGAS/FiniteStatusBar, and possibly VEGAS/ElapsedTimeNode (which displays the clock) and VEGAS/GameTimer (which formats the time). But for some reason, GameTimer uses a translatable string pattern for the time format.

This is low priority. In practice, time strings will never be doubled.