-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Resurrect old color picker #20742
Resurrect old color picker #20742
Conversation
i wanted to mention that players in general don't mind if multiple players - in the same team or not - have about the same color - for as long as they are able to recognize and distinguise their own units. so if i.e. the progress bar for your own units would have a different color than of other players, or there is some mode/key that tells you to turn other players to another tint, that could work. the issue is not that colors may look alike, but that you don't know which units are yours or not. |
OpenRA.Mods.Common/UpdateRules/Rules/20221203/AddColorPickerValueRange.cs
Outdated
Show resolved
Hide resolved
b0e6704
to
f609226
Compare
Made the IColorPickerManagerInfo interface much more generic and cleaned up a bunch of code in the process |
fixed |
There is a superflous dot in the first commit message. |
If you so wish @abcdefg30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still seem to be missing some colors very close to white, but I don't think that was ever the goal. We do now have so very dark colors.
Bonus points for yaml hex colors actually matching their in-game representations (making that particular ORAIDE feature useful again). 👍
Couldn't spot issues ingame. I went over the first commit and got halfway through the second, so this isn't a complete review, but I still have a few comments to work on.
[Desc("List of saturation components for the preset colors in the palette tab. Each entry must have a corresponding PresetHues definition.")] | ||
public readonly float[] PresetSaturations = Array.Empty<float>(); | ||
[Desc("List of colors to be displayed in the palette tab.")] | ||
public readonly Color[] PresetColors = Array.Empty<Color>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be checking when loading these colors if they violate the Saturation or ValueRanges above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are going to get fixed anyway. But we could add a lint check if you feel it's needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint checks are always nice, but I wouldn't say it's required here. I was talking about runtime and as long as these colors are fixed to valid ranges that should be fine.
OpenRA.Mods.Common/UpdateRules/Rules/20221203/AddColorPickerValueRange.cs
Outdated
Show resolved
Hide resolved
OpenRA.Mods.Common/UpdateRules/Rules/20221203/AddColorPickerValueRange.cs
Outdated
Show resolved
Hide resolved
OpenRA.Mods.Common/UpdateRules/Rules/20221203/AddColorPickerValueRange.cs
Outdated
Show resolved
Hide resolved
OpenRA.Mods.Common/Widgets/Logic/Settings/DisplaySettingsLogic.cs
Outdated
Show resolved
Hide resolved
Sounds like this should finally close #20415. |
Note: PR NOT cherry-picked to |
I vote for picking to |
Closes #20415
Credit to @darkademic. I just added a few of the missing bits such as the update rule.
Color picker in this PR
![Screenshot 2023-03-12 at 20 37 22](https://user-images.githubusercontent.com/37534529/224565256-37045873-bff2-42c4-a05b-827a495a8b71.png)
Old color picker
![Screenshot 2023-02-27 at 22 45 54](https://user-images.githubusercontent.com/37534529/224565064-b0e55fd8-d248-4b22-8952-54179a6fc7db.png)
Bleed color picker
![Screenshot 2023-02-27 at 22 45 40](https://user-images.githubusercontent.com/37534529/224565047-d5c3d897-5004-4d7d-b490-ebe48a30900f.png)
As you can see the the color picker looks better with S and V axes flipped.
I also implemented
IColorPickerManagerInfo
interface so that third party mods would be able to implement their own color pickers. When reviewing the second commit I recommend to start with the interface.