Skip to content

Add the option to adjust the tint on the song progress overlay#1564

Open
RubyStarbloom wants to merge 1 commit into
YARC-Official:devfrom
RubyStarbloom:pr/add-song-progress-tint
Open

Add the option to adjust the tint on the song progress overlay#1564
RubyStarbloom wants to merge 1 commit into
YARC-Official:devfrom
RubyStarbloom:pr/add-song-progress-tint

Conversation

@RubyStarbloom

Copy link
Copy Markdown

Added a color-selection option to add a tint to the song progress overlay around the score counter.

I am colorblind and have had difficulty seeing this at a glance with the default blue. This just allows a player to customize to something with higher contrast.

@wyrdough wyrdough left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! In terms of the setting itself and how it functions, this is 100% spot on.

Unfortunately, you can't directly serialize a ColorSetting because it uses Unity.Color internally, which has recursive references that make NewtonSoft sad. Probably the easiest thing to do is to add another converter like JsonColorConverter that converts Unity.Color to System.Drawing.Color before serialization and back when deserializing. It should be relatively straightforward since we already have extensions to convert between the two, so you can just do things like systemColor = unityColor.ToSystemColor() and unityColor = systemColor.ToUnityColor() to swap between them.

The part I'm not as clear on is how NewtonSoft would handle the case with multiple converters when the first converter converted a value to something the second converter would itself want to convert. I presume we would want UnityColor to get transmuted into a System.Drawing.Color and then run through the existing JsonColorConverter to do...whatever it is that does... If it really does just run through the list in order, it ought to work as desired, but I don't actually know that to be true.

In the future it would be helpful if you made sure your editor wasn't unnecessarily adjusting whitespace or end of line markers, as it makes the diffs on GitHub pretty useless since it looks like a wholesale replacement in the diff despite being just a minor change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants