Skip to content
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

instrument ScoreDisplay* types #69

Open
pixelzoom opened this issue Apr 16, 2018 · 5 comments
Open

instrument ScoreDisplay* types #69

pixelzoom opened this issue Apr 16, 2018 · 5 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Apr 16, 2018

ScoreboardBar appears at the top of many games, and looks like this:

screenshot_68

In #66, ScoreboardBar was deprecated and replaced by FiniteStatusBar, to accommodate enhancement requests by designers.

One of the requests was to be able to use the new ScoreDisplay* types to display the score. The 4 ScoreDisplay* types were developed in #59 and #66, and they look like this:

screenshot_69

The score display in ScoreboardBar was implemented and instrumented for PhET-iO like this:

94 // Score
95 var scoreText = new Text( '', _.extend( { tandem: options.tandem.createTandem( 'scoreText' ) }, textOptions ) );
96 scoreProperty.link( function( score ) {
97 scoreText.text = StringUtils.format( labelScoreString, score );
98 } );

Moving to FiniteStatusBar creates two issues for PhET-iO:

(1) None of the ScoreDisplay* types are currently instrumented for PhET-iO. So until they are instrumented, we've lost PhET-iO support for the score display in any games that used ScoreboardBar.

(2) Instances of ScoreDisplay* types are not created by FiniteStatusBar; they are created by the client and passed to FiniteStatusBar as a constructor argument. So if the structure is exposed in the phetioID (which it typically is) that structure is now totally different.

I have no plans to address this. Assigning to @samreid and @zepumph so that they are aware of this.

@pixelzoom pixelzoom changed the title instrument 'ScoreDisplay' types instrument ScoreDisplay* types Apr 16, 2018
@pixelzoom
Copy link
Contributor Author

@ariel-phet FYI.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Apr 16, 2018

In case you were planning to dive right into this... Please hold off for a couple of hours, I'm making an API change that will make this a bit easier.

@pixelzoom
Copy link
Contributor Author

API change completed. Status bars now create and manage their score display. So that makes this issue irrelevant:

(2) Instances of ScoreDisplay* types are not created by FiniteStatusBar; they are created by the client and passed to FiniteStatusBar as a constructor argument. So if the structure is exposed in the phetioID (which it typically is) that structure is now totally different.

@zepumph
Copy link
Member

zepumph commented Apr 23, 2018

Currently the only game that is instrumented is BAA, and it will be largely reworked before republish. I don't plan on working on this until we are working on stable api for a sim with a game. Unassigning myself.

@zepumph zepumph removed their assignment Apr 23, 2018
@samreid
Copy link
Member

samreid commented May 8, 2018

Understood--I suspect we will instrument these for the next stable PhET-iO game sim. Unassigning myself until then.

@samreid samreid removed their assignment May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants