simple_scoring: Show a single score label#250
Merged
dbnicholson merged 1 commit intomainfrom Oct 10, 2024
Merged
Conversation
dbnicholson
reviewed
Oct 9, 2024
| if _score_label: | ||
| return | ||
|
|
||
| _score_label = Label.new() |
Member
There was a problem hiding this comment.
Why not just make this extend Label instead of having a child label?
Contributor
Author
There was a problem hiding this comment.
I played with that :) My reason here is I felt it's a feature that SimpleScoring provides a simple interface in the editor: no label properties, no extra Control-related handles in the canvas. But with that in mind, I created #249 to add a block for setting a label's text.
Member
There was a problem hiding this comment.
OK, that's fair. We can always change that later if we want.
bbc8082 to
ea8b37a
Compare
dbnicholson
approved these changes
Oct 10, 2024
Instead of SimpleScoring providing a left and right score, change it to keep track of a single score, and show a single label. In the pong_game scene, we add two nodes: one for the left player, one for the right player.
ea8b37a to
b2e8275
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of SimpleScoring providing a left and right score, change it to keep track of a single score, and show a single label. In the pong_game scene, we add two nodes: one for the left player, one for the right player.