Use P1 inverted color to mark selected bar in editor #870
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.
Before, the selected bar would use P2's color to mark the selected bar. This leads to no marking at all when no color has been selected for P2.
The color attribute for each bar currently holds only a single integer for the player number, since this reuses the coloring-mechanism of the actual sing mode. I chose to mark the selected syllable as belonging to player 99 (instead of player 2) and then making a distinction for that number. The choice is arbitrary, I just didn't want to use 0 since it seems to be already used for something else.
Currently, the color used for marking is the inversion of P1's color. We could also change this to not be based on the player colors at all, and instead use two fixed colors for selected/not selecte or similar.